Blog (page 4)

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 […]

Deno Stream Deck

The Stream Deck is a rather pricey keyboard. Each key is a programmable LCD at ~72×72 pixels depending on device. Like all Elgato products, the Stream Deck is designed for broadcasting but can be repurposed for general use. The official Stream Deck software is a drag & drop UI with extensions. For non-techy users it’s well […]

Let me type my ******* password!

Did I miss the “user experience” memo about passwords? I’ve noticed a growing trend in website design that is driving me crazy. It’s actually far from a new trend. It has insideously crept across the web for years and has basically ruined everything. Call me melodramatic but I’m writing this on a Monday and I hate […]

Tailscale

I have a rule of thumb; avoid products and services that advertise on any podcast I listen to. They over hype and under deliver and I always get burnt. This is no more true than with VPNs. So it was a long time before my curiosity got the better of me and I looked into […]

Is Fresh, fresh?

Before I discuss the main topic; a few thoughts on Astro! I love static websites. Static websites are super fast “in the cloud” and “on the edge”. Unfortunately static site generators (SSGs) are not so quick. Astro! To learn Astro I rejiggered my website (the one you’re reading now) to fit into it. Astro seems to be the […]