Blog (page 6)

I’m on Mastodon

I’ve finally set up a Mastodon account: @[email protected] Fosstodon seemed like a good place to start. I was going to self host my own instance but I just don’t have the time for that right now. Project for the future, maybe! Anyway, Twitter is obviously imploding. I’ll be posting on both for the foreseeable future. Over the weekend […]

Docker VPN and Proxy Containers

Setting up a VPN in a Docker container is very useful. You can utilise it in various ways without tunneling your entire network traffic through the VPN. I’m currently using ProtonVPN and Protonwire as the container. It wouldn’t be too difficult to roll your own container if the VPN has CLI software (or OpenVPN or WireGuard […]

Goodbye GPG, Hello SSH Key Signing

I was using a GPG key to sign Git commits but I’ve now swiched to an SSH key. GPG keys are a pain to manage on macOS. Going full SSH is one less concern to remember. GitHub added support for SSH signing back in August last year. My process was to generate a new key called […]

iOS Web Apps and Media Session API

I’ve been rewriting my podcast/audiobook PWA (progressive web app). More about that soon. For now I’m excited about one feature. PWA support on iOS has been lacklustre compared to Android. At least that was true when I switched back to iOS a couple of years ago. At times critical features like background audio playback and IndexedDB […]

Tail Lines in Deno

Reading lines from a text file is easy with Deno: At least, if you’re reading from the first line to the last. To implement this you basically have to read one byte at a time until you find a newline character. That is 0x0A in hexadecimal and \n escaped in a string. Windows uses the \r\n sequence […]

Promise Error Handling in JavaScript

I’ve been neck deep in asynchronous JavaScript. Here is a quick test (for my future self). Consider the following code. The URL is purposefully invalid to throw a fetch error. What do you think the output will be? Note: all examples are using the Deno runtime. Other JavaScript environments may not support top-level await. The general principles […]

Scripting Apple Music

Hey. I’ve been busy! Last year I started coding my own Stream Deck software to support plugins via WebSocket. I’ve also been giving Apple Music a listen (over Spotify). The Music apps on macOS and iOS are rubbish. The macOS app is woefully slow. So the less time spent using it the better. I’ve also found the […]

Buy me a coffee! Support me on Ko-fi