All Posts

Page 1 of 22

How to test new Github Actions workflows

I recently build out a data processing pipeline that uses Github Actions, and so needed to add several new workflows. I couldn’t for the life of me figure out how to test them. They were going to be initiated either as part of a pipeline (using workflow_call), or manually, using workflow_dispatch. In most cases, each workflow had inputs which needed...

Talk on Plain Language Law at the AI Engineers meetup in Wellington, NZ

Last night I had a great opportuntity to talk about Plain Language Law, a site that I built using my own time and personal development time provided by Ackama. Plain Language Law is a site that turns New Zealand legislation into plain language using LLMs. This was the first meetup I’d presented at, so I really appreciated the invite, and...

Handy access to OS environment variables on Debian

This morning, while checking (yet again) how to install Postgres inside a Debian container, I stumbled across a file that I didn’t know existed - /etc/os-release - this file contains a bunch of handy variables which can be sourced to chuck them into your environment as environment variables: PRETTY_NAME="Debian GNU/Linux 12 (bookworm)" NAME="Debian GNU/Linux" VERSION_ID="12" VERSION="12 (bookworm)" VERSION_CODENAME=bookworm ID=debian HOME_URL="https://www.debian.org/"...

How to set up Rails directories for MCP servers

I’ve recently started on a new Rails application which will define at least one MCP servers, and potentially 2-3. To support this, I wanted to set up a new namespace in my app/ folder to contain all the MCP ‘stuff’ - I also do the same thing for GraphQL mutations, resolvers, queries etc. Zeitwerk has made autoloading and eager loading...

Bikeshed #470: All about Queues

I listened to https://bikeshed.thoughtbot.com/470 in the weekend. There was a fair amount of talking about judoscale, but there was also some interesting stuff in there about measuring queue performance. A couple of key takeaways for me: It seemed like a really good suggestion to me was to name queues by their SLA, rather than their purpose - for example, instead...

Connecting to a locally Running app with hotwire native

title: Connecting to a locally-running app with Hotwire Native category: TIL – I’ve just started a new Hotwire Native application. The Getting Started docs for Android use a deployed domain name, so while the demo app worked just fine, I had a bit of trouble figuring out how to connect to my locally-running web app from an Android emulator. In...

A simple redirect to next pattern for Rails

In Rails controllers, it’s pretty common to redirect somewhere when an action is completed. Sometimes this location is unknown, and therefore straightforward. Other times I just want to redirect ‘back’ - wherever that might have been - redirect_back(fallback_location: wherenver_path) is perfect for that. Occasionally though, I’ll want to determine the next path from the caller - often this will be...

How to run a command via AWS SSM with live output

This little technique is a great example of how simple *nix utilities can be (mis)used to accomplish some interesting things: (echo "./deploy.sh" && cat && exit && exit) | \ aws ssm start-session --target $INSTANCE_ID This: Echos the command into the shell session once started (echo "./deploy.sh" - obviously whatever command you want to run goes here) Runs cat to...

A Stimulus controller to auto-submit authentication codes

I think this is neat - very succinct. This controller expects an input that calls formatOnSubmit on input, which removes invalid chracters, strips the input (e.g. of spaces), and then automatically submits it. Works great with pasting, manually typing, and provides fast feedback to users. import { Controller } from "@hotwired/stimulus"; export default class extends Controller { static targets =...

Open-sourcing a reference implementation of native iOS Google sign-in flow with Hotwire

I’ve just open sourced a reference implementation of native iOS Google sign-in using Hotwire Native. I developed this flow when building Virtualtrails, where I wanted to support both web and native authentication flows for Google Sign-in. Using Hotwire for this worked great - when native support is available, it’s automatically used. When not, it falls back to a web-based OAuth...

← Previous Page: 1 of 22