Migrating Astro from Vercel to Cloudflare Pages
Moving a static Astro site from Vercel to Cloudflare Pages is mostly straightforward, but there are a few sharp edges worth documenting.
Moving a static Astro site from Vercel to Cloudflare Pages is mostly straightforward, but there are a few sharp edges worth documenting.
Language models adept at Python offer throwaway code one might want to execute and forget, and it’s not unusual for these language models to assume access to the wider Python ecosystem.
I find myself in JavaScript codebases with Vite and vitest often enough that I’ve fixed and forgotten how to fix this error.
Shopify Plus subscribers gain access to OIDC support with which their customers can authentication using Auth0.
The World Health Organisation estimate at least 2.8 million people die each year as a result of being overweight or obese. Ischaemic heart disease is the number one killer world wide, and is associated with risk factors such as smoking, lack of exercise, obesity, high blood cholesterol, poor diet, depression, and excessive alcohol consumption.
Language models are articulate, confident, and utterly without the emotional feedback loops that make human workers ultimately accountable. They are, in essence, the perfect corporate psychopath.
The decision-making class are being sold a bill of goods. They’re replacing accountable humans with unaccountable systems, and they can’t tell the difference.
My favourite definition of money came from Dawkins who said money is a formal token of delayed reciprocal altruism. The idea that you helped my friend, he gave you a shark’s tooth or a shell or a clam, and now I’ll return the favour.
The discourse around AI fails to define its core concept before subjecting us to foundation-destroying cognitive contagions. We should start by defining what exactly we mean by “Artificial Intelligence”.
Technical debt is bandied about the meeting rooms and corridors of tech startups and large enterprises, used to describe everything from messy code to lax security practices. And yet, its origins and pernicious effects are misunderstood.
When provisioning Auth0 connections (especially via Terraform), it’s particularly useful knowing the set of supported strategies.
The Rust ecosystem has a nifty trick for opening documentation locally, but when managing Rust with Nix, we’re missing one important piece in the toolchain.
Computers are fantastically naive. They compute rather than intuit, they calculate quickly and even more quickly fail to understand one’s intent. If you’ve ever programmed a computer, you’ll have encountered how unforgiving they can be. Operating systems and programming languages are fastidious collaborators who’ll refuse to cooperate over the tiniest indiscretion.
Opting out of Astro’s telemetry and third-party tooling toolbar is a little more tricky thanks to the new bespoke preferences system.
When displaying a little message to help understand why my code doesn’t work, a little colour can go a long way to breaking up a lengthy line.
Keeping everything in Emacs opens up a world of possibilities, combined with a freedom found less and less in our virtual spaces. With this quick trick, you can run your (non-interactive) development processes displayed in a buffer as a child process of Emacs itself.
Producing headings in a reproducible way with Tailwind and Astro requires some hoop jumping. To save you from solving the same problem in your own codebase, I share a monstrously messy Astro component I use on this very website to produce consistent headings with little effort.
The upgrade to Astro 4 has been painless, but the same simple issues come up enough that I thought I’d document the fix for anyone else encountering similarly sticky spots.
If you search for a way to format numbers into their ordinal representation (e.g. 1 becomes 1st, 2 becomes 2nd), you might come across hand-minified algorithms that inspire, but there’s a widely available API that you almost certainly should be using instead.
If you pipe all of your commands into Emacs buffers, or build all of your software in an IDE, you might not have use for ZSH’s delightful global aliases, but as someone who’s often cutting and splicing text, these little tricks come in extremely handy.
I have a fancy Terminal emulator that switches between a light and dark theme as the sun moves overhead. This feels easier on the eyes, but poses a challenge with colourised output from the plethora of tools and hacky scripts I tinker with daily.
While reviewing the set of maintainers in the Home Manager repo, I noticed each attribute list included a GitHub user ID.
Installing a Rust toolchain with Nix and Fenix is simple but there’s a small hoop to jump through as soon as you move to the more modern approach provided by flake.parts.
Testing semantic markup can prove tedious with complex selectors and fragile tests. Littering the code with “js”-prefixed classes is no better to the discerning craftsperson.
I recently found myself working on a Clojure codebase and needed to resurrect a pattern that’s served me well in large Clojure codebases for close to a decade.
My mind went to probabilities and subatomic wave packets when I heard wave function collapse, but it turns out there’s a novel algorithm that borrows ideas from entropy to generate random outputs.
Parsing strings can be made easier with liberal use of Bash’s builtins, which comes in especially handy when documenting things like APIs in Org-mode.
Logging colourful output came up recently in project I was working on. Here’s how I typically configure logging from my Clojure codebases with a little colour on top.
A quick win that has saved me minutes of searching online documentation while I’m deep in a Ruby codebase is combining the power of a language server with predecessors like Robe.
Considerate use of colour can help paint a picture on the command line, but when a tool doesn’t support the requisite ANSI codes output becomes garbled beyond recognition.
I often find myself testing and documenting things from Org mode, and have a cool trick one can use to peek at reponse headers from a source block.
When I first started writing code it was in Notepad on Windows. I’ve still not forgiven Microsoft.
I’ve found myself writing a lot more Ruby than expected recently, and waiting on Rubocop to tell me my code is bad enough that I can’t ship my work. Something had to be done.
Astro components come in many shapes and sizes. This is one of my favourites.
Authentication in a Ruby on Rails application is a problem well-served by libraries like Devise, but the requirement for authentication via a third party comes up in most cases.
While Python sees the most significant investment by the machine-learning community in the 2020s, the foundations of AI were symbolic and largely Lisp-based. Many have attempted to explain this progression, and while history is always fascinating, today’s learning comes from wanting a better language than Python that can benefit from all the brilliant work being done by the snake-loving masochists.
Like every other startup, I’m adding vectors and embeddings to all of my products to capitalise on the cumulative creative efforts of humanity.
While most developers deride XML, opting instead for a subset of the second-most scolded language on the planet, sitemaps and Java tools still depend on this pointy format.
When everything is text, one spends 50% of their time parsing strings and the other 50% fixing errors produced by representing everything as text.
Literate programming is a superb way of encoding knowledge in a collaboration with a machine, and Org mode is one of the best environments for interacting with text and images out there.
Having moved away from Ansible to configuring my macOS environment with nix-darwin and Home Manager, I found myself wanting to DRY up the Flake entrypoint to my many hosts.
A big part of my Physics education was based on statistical mechanics and the work of the Austrian Physicist, Ludwig Boltzman.
As part of the upgrades handed down to me by the FreeBSD/TrueNAS teams, I ran into a strange issue where pkg was trying to install things from a very-end-of-life package repository, regardless of my configured repositories.
It appears things have changed in FreeBSD 13, and the venerable motd has had a facelift.
sub Some time ago, I wanted to add a custom CLI to my ~/.config/box project, where I automated the configuration of various computers with a boatload of YAML on top of Ansible.
More and more applications offer an automatic switch from light mode to dark mode as your plot on Spaceship Earth turns its back on the sun. In “modern” applications, these comforts are commonplace, but a little work is required to upgrade software older than any dog, cat, and most millennials.
I’m making use of Nix to manage a slew of Clojure and Python dependencies for an upcoming article, and I decided I’d replace flake-utils with flake.parts as part of my ongoing yak-shaving duties.
When I find myself repeating the same operations over and over, it’s time to timebox some automation to preserev my meaty appendages.
When flying around a website with pages of varying heights, you may notice elements jumping about without apparent cause. I was perplexed until I realised the problem stemmed from invisible scrollbars.
As part of my Kagi subscription, I must use their Safari Web Extension to redirect search requests to their website. A recent update to their extension broke the redirect, meaning a good proportion of my search traffic leaked my data even more than usual.
If your static site is a function of time, triggering a build at regular intervals can ensure things remain fresh.
Out-of-the-box inline code is wrapped in backticks, much like the Markdown that probably produced it.
One might assume installing aspell and associated dictionaries with Nixpkgs can be accomplished using the familiar approach of listing desired packages.
The measure of a modern software engineer in our attention economy is easily calculable thanks to companies like Microsoft acting both as bastion and companion in demonstrating one’s prowess.
I was walking through a London park recently, and while looking at the sky I started thinking about the ceiling above us.
Code represented in textual form obfuscates connections that must be understood before one can manipulate with confidence.