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”

Galaxians vector
Figure 1. Galaxians.

As a family gift for Christmas 2020, I set up a Raspberry Pi 400 with Retropie. The plan is to load a selection of the “best of the best” games from computer game history, starting with games up to, roughly, 1985.

The kid doesn’t really know any better, so we can play Space Invaders unsullied by time and expectations and enjoy a speedrun through gaming history, playing just the highlights.

I’ll add more games as we go along, progressing through gaming history, one classic game at a time.

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

Spiralized carrots & daikon radish, with halved Jalapeno, in the brine ready to ferment.
Figure 1. Spiralized carrots & daikon radish, with halved Jalapeno, in the brine ready to ferment.

This is a rather loose adaptation of a traditional Vietnamese recipe, often used as a filling in Bánh Mì. You can google for lots of variations. Đồ Chua is often made as a vinegar pickle, with added sugar – this recipe is a keto/paleo & sugar-free lacto-fermented version.

The basic idea is to spiralize (or grate) & mix everything, except the chilies. Then pack all the spiralized vegetables into jars, with the halved chilies slid down the side, topped up with brine.

Start by making the basic brine and leave to dissolve while you prepare the vegetables.

Basic Brine

Important to measure carefully. This is the brine I use for most simple ferments, unless I find a recipe that has a good reason for using something different …

Continue reading “Fermented Bánh Mì/Đồ Chua(ish) Recipe”

Two mason jars, full of fermenting cucumbers.
Figure 1. Two mason jars, full of cucumbers, just gone in. Both using this recipe, one with added chilli flakes, one with added Sichuan pepper.

Here’s my lacto-fermented cucumbers recipe. This is adapted from the great Wild Fermentation book. I’ve honed this recipe to perfection over many trials – but you’ll need to try it a few times and adjust it to your particular cucumbers, climate & tastes, I expect.

Although mini-cucumbers are the archetypal “pickle”, this recipe is not limited to just cucumbers. Pretty much any crunchy vegetable can be fermented like this. Basically, any vegetable that’s crunchy will ferment well this way.

This is essentially two recipes: one for making the “basic brine” – which I use for lots of similar ferments – and one for making the fermented cucumbers, using the brine. Both recipes are very simple …

Continue reading “Basic Pickles or Fermented Cucumbers Recipe”

  • Digital lab books
  • Continuous publication of all data
  • Connected lab equipment
  • Complete research stream, published all the time, for everyone
    • Can follow a stream for a person, lab, institution, paper, etc…​
    • Research belongs to the person (contract?), but can appear in any relevant stream
  • Research Graph - follow collaboration links
  • Publish as normal, refer to published data stream


See also: - labstr

Continue reading “As We May Research”

Blueprint style diagram showing a Teapot.
Figure 1. A teapot, cut in half. Sort of. Original clipart Kitchen Utensils Silhouette, by GDJ, Public Domain. More on Teapots.

I’ve had a mysterious broken page on this site for a while - but been too busy to look into it. My Comprehensive Linux Backups with etckeeper & backupninja article has been refusing to load, and returning a weird HTTP 418 Unused status code instead. I finally made the time to figure out the cause.

It turned out that this was being caused by the Apache/PHP mod_security module. This is a static website - there’s no PHP anywhere - so why would that be a problem? Well, so far I’ve been very happily hosting the site on my old DreamHost shared hosting account - which comes with Apache & PHP installed whether you want it or not. At some point …

Continue reading “I finally figured out my mysterious 418/Unused HTTP Status Code”

This site has been generated using Pelican 3.3 for over two years - and I finally found some time to upgrade to the current version of Pelican, 3.6.3. This is how I did the upgrade.

I decided to be lazy and do the upgrade in-place, instead of creating a new virtualenv and copying the content & settings over. Luckily, this worked out OK, after a bit of fiddling around.

I also decided, rather cavalierly, to upgrade all the packages in the virtualenv to their latest versions while I was at it. To do this, I upgraded pip, then used pip-review. To upgrade pip & install pip-review system wide, run this on the command line:

$ sudo -H pip install --upgrade pip
$ sudo -H pip install pip-review

Then upgrade eveything in the sites virtualenv:

$ sudo apt-get install libjpeg-dev
$ workon duncanlock.net
$ pip-review …
Continue reading “How I upgraded this website to Pelican 3.6”

What would a unixy music collection actually look like, if we could start from scratch?

Everything Is A File

  • Everything is a file - including metadata
  • Separate music data from meta data
  • Separate static metadata from dynamic ‘play’ metadata - playcounts, last played time, etc…​
  • Each ‘thing’ in a collection: an album, an artist, a track - becomes a folder

Hierarchical Folder Structure

-- library-meta.yml
-- Collections/
---- global-collections-meta.yml
---- By Artist/
------ by-artist-collection-meta.yml
------ ABBA/
-------- artist-meta.yml
-------- artist-photo.jpg
-------- Waterloo/
---------- album-meta.yml
---------- cover.jpg
---------- back.jpg
---------- booklet.pdf
---------- playlist-mp3.m3u
---------- playlist-flac.m3u
---------- 01 - Waterloo/
---------- 02 - Sitting in the Palmtree/
------------ track-meta-static.yml
------------ track-meta-play.yml
------------ Sitting in the Palmtree.flac
------------ Sitting in the Palmtree.mp3
---------- 03 - ....
---- By Decade/
------ 70s/
-------- ABBA/
---------- Waterloo/ (symlink)
  • could have a FUSE file system to make this look like a regular music collection, or vice versa
  • possible multiple versions of anything at …
Continue reading “What would a UNIX Music collection look like?”

$ sudo su -

$ mkfs.btrfs -f /dev/sdb
$ mkfs.btrfs -f /dev/sdc

$ btrfs fi show

Should give you output something like this:

Cannot analyze code. No Pygments lexer found for “txt”.

.. code-block:: txt

        Label: none  uuid: bfee4bb4-3886-406f-94df-cb2dcf42f044
                Total devices 1 FS bytes used 112.00KiB
                devid    1 size 5.00GiB used 548.00MiB path /dev/sdc

        Label: none  uuid: a0192bd3-a8f7-477b-9bae-fea9a48aa1ab
                Total devices 1 FS bytes used 2.24GiB
                devid    1 size 5.00GiB used 3.04GiB path /dev/sdb

        Btrfs v3.12

$ mkdir /mnt/butter

$ mount /dev/sdb /mnt/butter $ btrfs device add -f /dev/sdc /mnt/butter

$ btrfs fi show

Label: none  uuid: a0192bd3-a8f7-477b-9bae-fea9a48aa1ab
        Total devices 2 FS bytes used 2.24GiB
        devid    1 size 5.00GiB used 3.04GiB path /dev/sdb
        devid    2 size 5.00GiB used 0.00 path /dev/sdc

Btrfs v3.12

$ btrfs fi …
Continue reading “Setting up a Raid1 Btrfs Home partition”

We use CentOS VMs at work to emulate our production environment - and it took me a while to figure out how to get the VirtualBox Guest Additions to build reliably on CentOS 6.4/5. This is what I’ve currently settled on as a reliable method.

First, make sure that you’ve got the kernel headers and tools installed that you need to build stuff:

$ sudo yum update -y
$ sudo yum install gcc kernel-devel kernel-headers dkms make bzip2 perl

Make sure that you’ve only got the current set of kernel headers installed - the one for the kernel you’re actually running. Having more than one set installed prevents this working properly. Running this should show you one version of each kernel package:

$ rpm -qa | grep kernel | sort

It should look something like this:

dracut-kernel-004-336.el6_5.2.noarch …
Continue reading “Reliably Building VirtualBox Guest Additions on CentOS 6.x”