The Quest for the Perfect Dark Mode, using Vanilla JavaScript

In The Quest for the Perfect Dark Mode, Joshua W Comeau extensively explains how he has implemented the Dark Mode toggle on his Gatsby-powered website. It follows the system’s light/dark mode preference, but also allows for an override which he persists in localStorage. The flow to decide if Dark Mode should be used or not […]

Chrome vs. BlinkMacSystemFont: A Workaround

UPDATE 2020-04-28: Good news everyone! A workaround for this bug has landed in Canary (Chromium 84) and will be merged into the M83 release! The workaround described here still applies for Chromium 81. The problem As detailed before there’s this bug that shipped with Chromium 81 which somehow prevents the font-weight CSS property from being […]

Automatically Fix Bluetooth Audio Balance Drift in macOS with “Balance Lock”

It’s been over 10 years that I’ve been using macOS (then OS X) and every now and then I notice that the audio balance of my Bluetooth headset is off for no apparent reason. Hmm, why is the balance for my headphone suddenly off? Back in 2014 I was lucky enough to see this tweet […]

Installing old OS X versions: fixing “OS X could not be installed on your computer”

Here in Belgium schools are locked down due to #coronavirus. With the school of my two oldest kids now switching to remote teaching, I took the time to set up my old MacBook Pro (model late 2008) for my two oldest kids to use. That didn’t go without any hiccups though: the OS X installer […]

PHP Performance Tip: Use fully-qualified function calls when working with namespaces

TIL: When working with namespaced files in PHP it’s a huge performance win when using fully-qualified function calls. ~ If you’re calling is_null in your code, PHP will first check for the function’s existence in the current namespace. If not found there, it will look for the function in the global namespace. This extra check […]

About the HTTP Expect: 100-continue header …

TL;DR HTTP clients may send a Expect: 100-continue header along with POST requests to warn the server that they’re about to send a large(ish) payload. At that point the server can: Decline, by sending back 401/405 and successively closing the connection. Accept, by sending back 100 Continue, after which the client will send over the […]

How to enable HTTP3 in Chrome / Firefox / Safari

Mattias recently tweeted that his website can now be served over HTTP/3 “even though no browser supports it yet”. While it’s true that no browser supports it out of the box right now, there are options to enable HTTP/3. Here’s how. 🧪 As with all experimental technolgy/features: things might break! Be warned! ~ Google Chrome […]

Speed up your Docker builds in Google Cloud Build with Kaniko Cache

When building Docker images locally it will leverage its build cache: When building an image, Docker steps through the instructions in your Dockerfile, executing each in the order specified. As each instruction is examined, Docker looks for an existing image in its cache that it can reuse, rather than creating a new (duplicate) image. Therefore […]

Tweet from the Firefox Address Bar by adding a Bookmark

In succession to Tweet from the Chrome Address Bar by adding a Custom Search Engine, you can also do this in Firefox. Simply define a bookmark (containing a %s wildcard) with a linked keyword and you’re good to go: Name: Compose Tweet Location: https://twitter.com/compose/tweet?text=%s Keyword: tweet You can now use the tweet keyword to start […]