duncan­lock­.net

Ninja is a surprisingly nice build system for tiny projects. That's more or less the opposite of what it's designed for, but it works really well for tiny things.


The content-type guessing done by AWS CLI is based on the mimetype definitions available on your system. You can improve the mimetype guessing by updating these definitions.


I had an issue where the AWS CLI wasn't guessing the content-type of SVG files correctly on sync and was setting them to `application/octet-stream` - the default "I don't know" mimetype. This is a quick fix for that.


Three mason jars, full of fermenting things. Two Bánh Mì(ish) and one eggs.
Figure 1. Three mason jars, full of fermenting vegetables. Two Bánh Mì(ish) and one eggs.

I’ve been fermenting vegetables of various kinds (and occasionally other things) at home for a little over two years. It’s a fun, interesting & nutritious hobby. On the whole it’s pretty easy and low stakes – the worst thing that happens is a few cucumbers go mouldy.

Because it doesn’t involve any heat – but does include pouring, measuring, stirring, spiralizing, grating (and some chopping) – it’s ideal to do with little kids.

According to my notes (which I didn’t start initially), I’ve made ~56 batches of ferments, ranging in size from a single 1l mason jar, to three 2l ones.

These are my lessons so far:

The difference between science & screwing around, is writing it down

As they say, the …

Continue reading “Lessons from Two Years of Fermenting”

How to slugify strings in bash, using a fairly simple function.


Sometimes I want to resolve several promises at once, then do something when they're all done. For example, make several API calls, then do something with all the results. Promise.allSettled is a better way to do this.


My new favourite thing in JS is Nullish coalescing: The nullish coalescing operator (??) is a logical operator that returns its right-hand side operand when its left-hand side operand is null or undefined, and otherwise returns its left-hand side operand.


Gauntlet Screenshot
Figure 1. Gauntlet, by far and away the kids favourite game so far.

Time for another update on the Retro Gaming project. It’s been roughly a month since the last update and we’ve been playing a bit more often this time.

Favourite Games So Far

Roughly in order of playtime:

Gauntlet is far and away the kids favourite game so far. Almost nothing else got a look in since I put it on. Even Super Mario Bros is a pretty distant second place, and the other games have barely been played at all.

I think there are two reasons for this. Firstly, Gauntlet is a 4 player co-operative game. So far we’ve only played with two players, but even then, co-op games are just really fun. I think the other reason …

Continue reading “Speedrunning Computer Games History with a 6yr Old - Part 3”

Time for an update on the Retro Gaming project. It’s been almost four months since we started and it’s been, predictably, lots of fun. What with work and school and everything else, we have very little time for playing computer games. That, combined with a fairly dry winter & spring letting us get outside more, means that even with the Covid-19 pandemic curtailing activities, we haven’t clocked very many hours of playtime.

Favourite Games So Far

Roughly in order of playtime:

In the end, we didn’t actually play any ZX Spectrum or C64 games at all, sadly. I played a lot of these when I was a kid, so I was secretly disappointed …

Continue reading “Speedrunning Computer Games History with a 6yr Old - Part 2”

Asciidoc
Figure 1. Asciidoc.

I’ve been using reStructuredText for writing on this blog, because it has lots of built-in features that markdown doesn’t.

However, reStructuredText’s actual syntax is a bit…​ fiddly - particularly its non-atx headings, too many things relying on lining up white space, etc…​ If I don’t use it for a bit, I have to look up or copy & paste all the advanced syntax.

I’d prefer to use AsciiDoc, as it has all the extra features, and if you use Asciidoctor, all the simple stuff is the same as markdown - which isn’t (currently) standard AsciiDoc, but is a nice simplification.

The subset of features from reStructuredText (or Asciidoc) that Markdown doesn’t have – and that I’m actually using on this blog, are:

  • Figure/Images with captions
  • Admonitions
  • Front-matter/Metadata
  • Footnotes
Continue reading “Using AsciiDoc & Asciidoctor for blogging”