RSSAmplifier

Blog

Blog - James Mead

jamesmead.orgRSS feed ↗10 posts

Latest posts

Organisation-specific git authentication and commit signing

Recently I wanted to use a separate SSH key for work on repositories in a specific GitHub organisation, but continue to use a single GitHub user account. I already had some organisation-specific git configuration which sets the email address used in commit notes and I've now managed to extend that to incorporate using an organisation-specific SSH key both for authentication with GitHub and…

Adding human.json to my website

Prompted by reading this blog post by Bastian Tzovaras , I've added a human.json file to this website to assert my authorship of the content and vouch for the "humanity" of other websites. The human.json protocol uses URL ownership as identity and trust propagates through a crawlable web of "vouches" between sites. I've also added an IndieWeb slashpage to explain that I don't use…

Configuring Zed editor to use HTML Beautifier as a formatter in ERB templates

Following on from my previous post about configuring Zed editor to use ERB Lint as a formatter , here's how to configure Zed to use Paul 's excellent HTML Beautifier as a formatter in ERB templates. Configure HTML Beautifier as a formatter for ERB files as well as HTML files by adding the following JSON to your Zed settings, either global or project-specific: { "languages": { "ERB": {…

Configuring Zed editor to use ERB Lint as a formatter

I've recently started using the Zed editor instead of VS Code. It took me a while to work out how to configure ERB Lint as a formatter, so hopefully this will save someone else some time. Write a shell script to run ERB Lint as follows: #!/usr/bin/env sh bundle exec erb_lint --autocorrect --stdin $1 2>/dev/null \ | sed '1,/^================/d'…

Mocha v2 release

This major version bump of the Ruby mock object library, Mocha , includes some fairly significant changes. So I wanted to expand a bit on the release notes and give some more detailed guidance on factors to consider when upgrading. Strict keyword argument matching Removal of deprecated functionality Dropping of support for older versions of Ruby, minitest & test-unit Acknowledgements TL;DR: If…

How to backup Google Drive to S3 using the AWS CDK

Way back in the Before Time , I did some work to automate a couple of our recurring manual Harmonia tasks. One of these was the task to back up our shared Google Drive to Amazon S3 . Prior to this we'd been running the rclone sync command manually on one of our local machines. One significant downside of this was that we each needed to have a local copy of all the files (~17GB), so I was keen…

Youtube video of my 3D maze game for the ZX Spectrum

I recently stumbled across a quirky Youtube video which piqued my interest. In the video James O'Grady demonstrated a 3D maze game. He'd typed in the code for the game from a familiar-sounding book called Graphic Adventures for the Spectrum 48K . The nominal author of this book, Richard Hurley, was one of my teachers and he included programs written by me and a number of my friends. The…

Using Lambda@Edge with CloudFront to configure redirect rules for domains

I'm a big fan of cool URLs and not breaking the internet and so over the years I've accumulated a few domains for which I've implemented a lot of redirect rules. In recent years I've implemented these rules using mod_rewrite and run them on Apache and on my Linode VPS, e.g. the redirect rules for blog.floehopper.org . However, in September 2019 I started publishing this website…

Multiple Rails development environments using nix-shell

I've continued to make slow but steady progress with my experiment to setup Rails development environments using nix-shell on a Vagrant VM running Ubuntu. I've now got to the stage where I have four Rails apps using combinations of Ruby versions, Rails versions, PostgreSQL versions, and MySQL versions which I'm pretty happy about! Ruby v2.5, Rails v5.2.4.4, PostgreSQL v10 Ruby v2.5,…

Automatically sending Webmentions from a static website

A few months back I wrote about indieweb-ifying this website . I attempted to follow the excellent indiewebify.me guide , but I skipped step 2 of Level 2, i.e. adding the ability to send Webmentions to other IndieWeb sites . My excuse at the time was: I decided to skip this step for now given that it's relatively easy to send a Webmention manually using curl and it's not as if I…