Computers & Tech posts

My main email app (Fastmail) on my phone logged me out without me noticing for two days. I’ve been trying to not pay as constant attention to my email as it is, so it just seemed nice, but I didn’t even really think about it in that period. Happened to have more than the usual amount of emails when I got back in, though luckily, nothing important. It’d be nice if I could have it only notify me immediately for email from certain addresses or something like that.


ZSH regex capture groups

In writing a script for the ZSH shell, I wanted to extract some bits from a string. I looked for a regex solution, using capture groups. I could not figure out how to do it with sed but I found that the [[ ]] format of the test command allows this with the =~ operator. If the test returns true, values are stored in a $match array and can be accessed like $match[1] and so on.

Continue reading post "ZSH regex capture groups"

Finally got the One UI 7 / Android 15 update on my phone (Samsung S24) today. 15’s been out on Pixel devices for six months, but it took Samsung a long time with this one. I had bought this phone in part because Samsung is supposed to be quick with releases. Hopefully, this doesn’t become the norm.

Not a lot has changed noticeably. My most liked change is that I can have most app icons match my chosen accent color (green) which makes my home screen and quick app drawer look much nicer. There’s also a feature which separates the notification drawer and quick settings slide down, where swiping down from the left shows one and from the right, the other. I’m still getting used to that but may find it results in less swipes. There are a few other aesthetic tweaks. I think there’s a bunch of AI stuff, but I’m not that interested in that.


Using pipes to augment IO of command with bash script

I like the interactive mode of the bc command line calculator because it is ubiquitous, but wanted to augment its functionality a bit to add a couple features I liked from another calculator program. I wanted to make modifications to the text I typed before sent to bc and modify the text it outputted. This can be done on standard POSIX shells with mkfifo, but it took me a good while to figure out how to do this with both input and output and get something working nicely without it freezing or leaving artifacts. So I’m sharing how to do this in a bash script.

Continue reading post "Using pipes to augment IO of command with bash script"

Server upgraded from Ubuntu 20.04 to 22.04

My server was on Ubuntu 20.04, but due to the end-of-life of that LTS version next month, I have upgraded to 22.04. My server is managed with Vagrant / Ansible. My plan had been to do a new local VM on the newer version, get it working properly with Ansible, then set up a new server with it and migrate over. However, since Ubuntu isn’t releasing an official Vagrant box for 24.04 and beyond, I don’t think it makes sense to take that path. I may move over to Debian or look into Vagrant alternatives, but to get this done before EOL, I decided to just try a do-release-upgrade to upgrade the existing server in place.

Continue reading post "Server upgraded from Ubuntu 20.04 to 22.04"

In Mac OS Sonoma, browsers now require and the OS will ask for the “Local Network” permission to access local websites. I didn’t know why it was asking and didn’t allow it, but then couldn’t access my sites. I had to go to “System Settings”, the “Privacy & Security” pane, select “Local Network” and turn on for my browser(s) to get access again.

If it matters, my local dev setup uses domains set in /etc/hosts pointing to IPs of VMs run by VirtualBox, managed by Vagrant, set up like web.vm.network 'private_network', ip: '192.168.56.1'.


Mac: create app launch keyboard shortcuts

I wanted to create some global keyboard shortcuts for launching apps on MacOS. I used to do this with Quicksilver, but I’ve stopped using that and now just use Spotlight for most of what I used that for. Spotlight, of course, doesn’t have all the features of Quicksilver, including keyboard shortcuts for arbitrary actions. The “Keyboards Shortcuts” pane in System Settings can do a lot, but not specify a specific app to launch. Searching around the web, I found that Automator could be used to add services to it. So a flow to do this for an app would be like:

Continue reading post "Mac: create app launch keyboard shortcuts"

Compact about:profiles in Firefox

Firefox allows us to create multiple browser profiles to separate our activities, such as work, personal, finance, etc. It has an about:profiles page to manage and launch these. The page has not gotten much UX love and does not make very good use of space. On load, I can’t see the full second profile on my laptop (Macbook) screen. After living with this a long time, I decided to use userContent.css to customize the appearance so everything fits on one screen and I can quickly and easily find the two things I need most of the time: Each profile’s name, and the button to launch it with.

Continue reading post "Compact about:profiles in Firefox"