raspberrypi

Ratchet Adapter

I want to electrically drive this ratchet mechanism to avoid the manual labour of turning it by hand. I found a motor with a 1600:1 gearbox on eBay (shipping from China of course) which looks perfect, however it has a 10mm diameter keyed output shaft which doesn’t nicely couple to my 3/4” square ratchet shaft.

1 min read

Audio Stream from a Raspberry PI

Now singing has returned to churches I need to add an additional microphone to pickup the choir. I’d like this to be completely separate to the Church PA system to avoid playing this sound out through the speakers. A Raspberry PI Zero W with a USB sound card looks to be a good option to capture the audio and stream it to OBS.

3 min read

Mini ITX as Windows 2008 Server

Unfortunately without a DVD drive and with no capability to boot from USB I’m struggling to get a clean OS on my Mini ITX machine. The internal drive is IDE and I don’t have any other machines with IDE around and I don’t know the password for the installed OS.

2 min read

Raspberry PI Camera with M12 Lens

I really need a good lens on my Raspberry PI camera to use it with OBS from a decent distance. The new high resolution Rasperberry PI cameras look excellent but they also come with a heafty price tag which I just can’t justify.

3 min read

Normalise MP3 Files

I have hundreds for MP3 files but the levels aren’t standardised in any way which makes streaming them a bit hit and miss. I can normalise them using AudaCity but I’d really like an automatic way of doing it.

~1 min read

TEMPer USB Temperature Sensor

These USB sensors are available pretty cheaply from PiHut and Amazon and are great for monitoring the temperature remotely (where you have a Pi).

1 min read

Music Library

Using a Raspberry PI with a USB CD drive to read all my CDs and create a master, FLAC format, repository and from that create MP3 and AAC versions for the car and iTunes.

1 min read

OLED Module for PI

Run raspi-config and turn on the i2c interface

1 min read

Retro Gaming: Space Raiders

Dylan’s favourite t-shirt is his Game Over shirt which always reminds me to Space Raiders from the ZX Spectrum days. I found the cassette tape quite easily but it took a significant amount of searching to find the Spectrum itself and included in the box was the tape recorder as well!

2 min read
Back to Top ↑

OCaml

Blade Server Reallocation

We have changed our mind about using dm-cache in the SSD/RAID1 configuration. The current thinking is that the mechanical drives would be better served as extra capacity for our distributed ZFS infrastructure, where we intend to have two copies of all data, and these disks represent ~100TB of storage.

~1 min read

OCaml Infra Map

Yesterday, we were talking about extending the current infrastructure database to incorporate other information to provide prompts to return machines to the pool of resources after they have completed their current role/loan, etc. There is also a wider requirement to bring these services back to Cambridge from Equinix/Scaleway, which will be the subject of a follow-up post. However, the idea of extending the database made me think that it would be amusing to overlay the machine’s positions onto Google Maps.

1 min read

Blade Server Allocation

Equinix has stopped commercial sales of Metal and will sunset the service at the end of June 2026. Equinix have long been a supporter of OCaml and has provided free credits to use on their Metal platform. These credits are coming to an end at the end of this month, meaning that we need to move some of our services away from Equinix. We have two new four-node blade servers, which will become the new home for these services. The blades have dual 10C/20T processors with either 192GB or 256GB of RAM and a combination of SSD and spinning disk.

1 min read

Topological Sort of Packages

Given a list of packages and their dependencies, what order should those packages be installed in?

1 min read

Real Time Trains API

After the Heathrow substation electrical fire, I found myself in Manchester with a long train ride ahead. Checking on Real Time Trains for the schedule I noticed that they had an API. With time to spare, I registered for an account and downloaded the sample code from ocaml-cohttp.

2 min read
Back to Top ↑

obs

Ratchet Adapter

I want to electrically drive this ratchet mechanism to avoid the manual labour of turning it by hand. I found a motor with a 1600:1 gearbox on eBay (shipping from China of course) which looks perfect, however it has a 10mm diameter keyed output shaft which doesn’t nicely couple to my 3/4” square ratchet shaft.

1 min read

Audio Stream from a Raspberry PI

Now singing has returned to churches I need to add an additional microphone to pickup the choir. I’d like this to be completely separate to the Church PA system to avoid playing this sound out through the speakers. A Raspberry PI Zero W with a USB sound card looks to be a good option to capture the audio and stream it to OBS.

3 min read

Mini ITX as Windows 2008 Server

Unfortunately without a DVD drive and with no capability to boot from USB I’m struggling to get a clean OS on my Mini ITX machine. The internal drive is IDE and I don’t have any other machines with IDE around and I don’t know the password for the installed OS.

2 min read

Raspberry PI Camera with M12 Lens

I really need a good lens on my Raspberry PI camera to use it with OBS from a decent distance. The new high resolution Rasperberry PI cameras look excellent but they also come with a heafty price tag which I just can’t justify.

3 min read
Back to Top ↑

OCaml

Blade Server Reallocation

We have changed our mind about using dm-cache in the SSD/RAID1 configuration. The current thinking is that the mechanical drives would be better served as extra capacity for our distributed ZFS infrastructure, where we intend to have two copies of all data, and these disks represent ~100TB of storage.

~1 min read

OCaml Infra Map

Yesterday, we were talking about extending the current infrastructure database to incorporate other information to provide prompts to return machines to the pool of resources after they have completed their current role/loan, etc. There is also a wider requirement to bring these services back to Cambridge from Equinix/Scaleway, which will be the subject of a follow-up post. However, the idea of extending the database made me think that it would be amusing to overlay the machine’s positions onto Google Maps.

1 min read

Blade Server Allocation

Equinix has stopped commercial sales of Metal and will sunset the service at the end of June 2026. Equinix have long been a supporter of OCaml and has provided free credits to use on their Metal platform. These credits are coming to an end at the end of this month, meaning that we need to move some of our services away from Equinix. We have two new four-node blade servers, which will become the new home for these services. The blades have dual 10C/20T processors with either 192GB or 256GB of RAM and a combination of SSD and spinning disk.

1 min read

Topological Sort of Packages

Given a list of packages and their dependencies, what order should those packages be installed in?

1 min read

Real Time Trains API

After the Heathrow substation electrical fire, I found myself in Manchester with a long train ride ahead. Checking on Real Time Trains for the schedule I noticed that they had an API. With time to spare, I registered for an account and downloaded the sample code from ocaml-cohttp.

2 min read
Back to Top ↑

Ubuntu

Gluster

Gluster is a free and open-source software network filesystem. It has been a few years since I last looked at the project, and I was interested in taking another look. Some features, like automatic tiering of hot/cold data, have been removed, and the developers now recommend dm-cache with LVM instead.

3 min read

Ubuntu cloud-init

Testing cloud-init is painful on real (server) hardware, as the faster the server, the longer it seems to take to complete POST. Therefore, I highly recommend testing with a virtual machine before moving to real hardware.

8 min read

Jitsi

I need to remotely control OBS during a live stream. This is quite simply achieved via VNC but I need the see and hear what’s going on at the same time. VNC doesn’t support audio on the free license and watching the YouTube stream is out of the question as it’s nearly 30 seconds behind real time.

1 min read
Back to Top ↑

bells

Most Popular Methods

There are ~72,000 Surprise Major performances on Bell Board. Bell Board displays results in pages of 200 performances. Thus we will need to download all the pages and concatenate them into a single file:

2 min read

Splicing Three Strand Rope

My sudden interest in rope splicing stems entirely from bell ropes. There seems to be three, perhaps four, splices to learn for this application. Links below to YouTube videos explaining how to do them:

~1 min read

Place Notation

Thomas Barlow has taught me place notation using Strike Back Surprise Major as the example. The notation for that is x38x14x58x16x12x38x14.12.78 l.e. 12. There are plenty of guides online on how to interpret it, such as this one on the CCCBR website.

3 min read
Back to Top ↑

perl

Place Notation

Thomas Barlow has taught me place notation using Strike Back Surprise Major as the example. The notation for that is x38x14x58x16x12x38x14.12.78 l.e. 12. There are plenty of guides online on how to interpret it, such as this one on the CCCBR website.

3 min read

Shape Files

Below is a perl script to create a PNG from a Shape file.

2 min read

Mandelbrot Set

The Mandelbrot set is created from this very simple formula in which both Z and C are complex numbers.

3 min read

Narcissistic Numbers

I heard about these on BBC Radio 4 More or Less and they just intrigued me, perhaps in part because they have no known application! In the past similar obsessions have appeared with the calculation of PI and right back to my childhood calculating powers of 2 on a BBC Micro.

1 min read
Back to Top ↑

powershell

PowerShell SNMP

Potentially, I’ve got a bit carried away here. There isn’t a native PowerShell module to query SNMP which I found a bit surprising. How hard could it be? I’ve got a SYSLOG server and client in PowerShell so this felt like a simple extension. The SNMP client needs to send a request over UDP to the SNMP server on port 161 and waits for the response back. Sending via .NET’s UDPClient is easy enough

5 min read

Which Funds Have Exposure to NetFlix?

Dabbling in the markets by way of investment funds is amusing. I use Hargreaves Lansdown to do this. HL have a fund research section which lets you look at a given fund and view the top 10 holdings so you can base your decision to invest in your belief in the underlying stock.

5 min read

Prime Numbers in PowerShell

Dylan was using a number square to calculate prime numbers so it amused me to code up a couple of algorithms to show just how quick the sieve method actually is. I’ve done these in PowerShell because … reasons.

1 min read
Back to Top ↑

Box

Box Diff Tool

Over the weekend, I extended mtelvers/ocaml-box-diff to include the ability to upload files over 50MB. This is a more complex API which requires a call to https://upload.box.com/api/2.0/files/upload_sessions by posting JSON containing the name of the file, the folder ID and the file size. Box replies with various session endpoints which give the URIs to use to upload the parts and to commit the the file. Box also specifies the size of each part.

~1 min read

Box Diff Tool

Box has an unlimited storage model but has an upload limit of 1TB per month. I have been uploading various data silos but would now like to verify that the data is all present. Box has an extensive API, but I only need the list items in folder call.

1 min read
Back to Top ↑

juniper

How To GitHub

I really don’t use GitHub often enough to remember the commands without searching for them each time, which means that I use GitHub even less as I can’t remember the commands. Here’s a short cheat sheet on the most common things I need to do in GitHub.

1 min read

Bose SoundTouch and Mini DLNA

Bose have a Windows application can host your music library, however I don’t have a Windows machine turn on permanently and I’d prefer a low power Raspberry PI option.

~1 min read
Back to Top ↑

Back to Top ↑

Back to Top ↑

3d-printing

3d Printed Train

Creating a new OO train body drawn from scratch in Fusion 360 to minic the original damaged version.

~1 min read
Back to Top ↑

Dell

More Kingston Drives

We have received the second batch of 40 x 7.68TB Kingston SSD drives, bringing the total to 50 drives.

~1 min read

Dell PowerEdge R640 Storage Server

We have received our first batch of 7.68TB Kingston SSD drives for deployment in some Dell PowerEdge R640 servers, which will be used to create a large storage pool.

~1 min read
Back to Top ↑

Dell

More Kingston Drives

We have received the second batch of 40 x 7.68TB Kingston SSD drives, bringing the total to 50 drives.

~1 min read

Dell PowerEdge R640 Storage Server

We have received our first batch of 7.68TB Kingston SSD drives for deployment in some Dell PowerEdge R640 servers, which will be used to create a large storage pool.

~1 min read
Back to Top ↑

R640

Dell R640 Ubuntu Installation

I could have scripted this via Ansible, but there would always be a manual element, such as configuring the H740P controller and booting from the network to get to the point where you can SSH to the machine. Therefore, I decided to just document the steps required.

2 min read

Dell R640 installation

Today we have racked the five 14th generation Dell R640 servers and a Dell N4032 switch.

1 min read
Back to Top ↑

arduino

Foot Operated Timer

At the end of a quarter peal there is always the question of how long it took and whether anyone really noted the start time. Mike proposed a foot operated timer.

2 min read

Arduino Gas Sensor

With the current emphasis on ventilation to reduce the risks associated with inhaled droplets it I have put together a simple gas sensor to record concentrations over time. The output is a CSV file which can be graphed in Excel.

4 min read
Back to Top ↑

bash

Dump Process Memory

Yesterday in a stroke of good fortune, I remembered a job that I’d set running a little while back and I checked in to see how it was doing. It’s a MPI console app running on 22 distributed Ubuntu nodes. My application was set to output the time periodically and it currently reported a runtime of 15837421 seconds (just over six months). Unfortunately I couldn’t see the current ‘best’ result as it results aren’t displayed until the end. I was intrigued to see how it was doing.

1 min read

Most Popular Methods

There are ~72,000 Surprise Major performances on Bell Board. Bell Board displays results in pages of 200 performances. Thus we will need to download all the pages and concatenate them into a single file:

2 min read
Back to Top ↑

bluesky

Setup Tangled with Bluesky

To setup this up, I’m using a modified version of Anil’s repo. My repo is here. Firstly, clone the repo and run gen-key.sh.

1 min read
Back to Top ↑

bluesky

Setup Tangled with Bluesky

To setup this up, I’m using a modified version of Anil’s repo. My repo is here. Firstly, clone the repo and run gen-key.sh.

1 min read
Back to Top ↑

opam

opam repo ci job timeouts

It’s Tuesday morning, and virtually all opam repo ci jobs are failing with timeouts. This comes at a critical time as these are the first jobs following the update of ocurrent/ocaml-version noted on 24th March.

3 min read

Installation order for opam packages

Previously, I discussed the installation order for a simple directed acyclic graph without any cycles. However, opam packages include post dependencies. Rather than package A depending upon B where B would be installed first, post dependencies require X to be installed after Y. The post dependencies only occur in a small number of core OCaml packages. They are quite often empty and exist to direct the solver. Up until now, I had been using a base layer with an opam switch containing the base compiler and, therefore, did not need to deal with any post dependencies.

1 min read
Back to Top ↑

openzfs

Distributed ZFS Storage

Following Anil’s note, we will design and implement a distributed storage archive system for ZFS volumes and associated metadata. Metadata here refers to key information about the dataset itself:

1 min read

Ubuntu with ZFS root

The installation of Ubuntu on ZFS contains about 50 steps of detailed configuration. I have 10 servers to install, so I would like to script this process as much as possible.

~1 min read
Back to Top ↑

sshd

Bluesky SSH Authentication

If you have sign up to tangled.sh you will have published your SSH public key on the Bluesky ATproto network. Have a browse to your Bluesky ID, or mine. Look under sh.tangled.publicKey.

~1 min read
Back to Top ↑

ubuntu

Hard disk failure

Check the status with sudo mdadm --detail /dev/md0

1 min read
Back to Top ↑

Back to Top ↑

Back to Top ↑

Back to Top ↑

Back to Top ↑

Back to Top ↑

Back to Top ↑

Back to Top ↑

Back to Top ↑

Fedora

Back to Top ↑

FreeBSD

FreeBSD 14.2 Upgrade

CI workers spring and summer run FreeBSD and need to be updated.

1 min read
Back to Top ↑

GCC

Back to Top ↑

GNU

GNU Parallel

If you haven’t used it before, or perhaps it has been so long that it has been swapped out to disk, let me commend GNU’s Parallel to you.

~1 min read
Back to Top ↑

Gluster

Back to Top ↑

Jitsi

Jitsi

I need to remotely control OBS during a live stream. This is quite simply achieved via VNC but I need the see and hear what’s going on at the same time. VNC doesn’t support audio on the free license and watching the YouTube stream is out of the question as it’s nearly 30 seconds behind real time.

1 min read
Back to Top ↑

Netboot.xyz

Back to Top ↑

OpenBSD

Back to Top ↑

Slurm

Slurm Workload Manager

Sadiq mentioned slurm as a possible way to better schedule the group’s compute resources. Many resources are available showing how to create batch jobs for Slurm clusters but far fewer on how to set up a cluster. This is a quick walkthrough of the basic steps to set up a two-node compute cluster on Ubuntu 24.04. Note that slurmd and slurmctld can run on the same machine.

1 min read
Back to Top ↑

Syncthing

Back to Top ↑

applescript

Back to Top ↑

c

Pentominoes

One day I was clearing out some old papers and I came across this programming assignment from university. I can’t recall which of the problems I tackled at the time, after all it was twenty-five years ago, but glancing over it now the pentomino problem caught my eye

4 min read
Back to Top ↑

c++

Latin Square

Looking at the latest video from Presh Talwalkar about solving the Latin square where each row is the first row multiplied by the row number I decided it was time to see if I could remember any C++ and code a solution.

3 min read
Back to Top ↑

capnpproto

Playing with Cap’n Proto

Cap’n Proto has become a hot topic recently and while this is used for many OCaml-CI services, I spent some time creating a minimal application.

2 min read
Back to Top ↑

clock

Clock winder repair

The galvanised steel wire rope on one of my clock winders has snapped. This is a 3mm rope, so it would have a rating of greater than 500 kg. I am quite surprised that it snapped, as the load on this wire rope is much lower than that of others in use in the same system.

1 min read
Back to Top ↑

cloud-init

Back to Top ↑

dm-cache

Back to Top ↑

docker

Back to Top ↑

flac

Music Library

Using a Raspberry PI with a USB CD drive to read all my CDs and create a master, FLAC format, repository and from that create MP3 and AAC versions for the car and iTunes.

1 min read
Back to Top ↑

get.dune.build

Equinix Moves

The moves of registry.ci.dev, opam-repo-ci, and get.dune.build have followed the template of OCaml-CI. Notable differences have been that I have hosted get.dune.build in a VM, as the services required very little disk space or CPU/RAM. For opam-repo-ci, the rsync was pretty slow, so I tried running multiple instances using GNU parallel with marginal gains.

~1 min read
Back to Top ↑

go

Updating Docker and Go

For some time, we have had issues on Ubuntu Noble when extracting tar files within Docker containers. See ocaml/infrastructure#121. This is only an issue on exotic architectures like RISCV and PPC64LE.

~1 min read
Back to Top ↑

irmin

Irmin Database

After Thomas’ talk today I wanted to try Irmin for myself.

~1 min read
Back to Top ↑

jekyll

WordPress to Jekyll Test

Install the Wordpress plugins UpdraftPlus. Create a new WordPress site and install the UpdraftPlus plugin and restore the database.

2 min read
Back to Top ↑

maths

Square Root

As a first step in calculating a square root look at the order of magnitude of the number and this will quickly allow the determination of the number of digits in the solution. Consider squaring numbers less than 10; the solutions will be less than 100. Squaring numbers less than 100 gives solutions less than 10,000 and numbers less than 1,000 will square to numbers less than 1,000,000 etc. In general terms the square root of a number with an even number of digits will have half the number of digits as the original number. For numbers with an odd number of digits then the solution will have one more than half the number of digits.

3 min read
Back to Top ↑

minecraft

Back to Top ↑

ocaml-ci

Moving OCaml-CI

As noted on Thursday, the various OCaml services will need to be moved away from Equinix. Below are my notes on moving OCaml-CI.

1 min read
Back to Top ↑

oled

OLED Module for PI

Run raspi-config and turn on the i2c interface

1 min read
Back to Top ↑

opam-repo-ci

Back to Top ↑

osx

Back to Top ↑

pi

Back to Top ↑

power9

Raptor Talos II - POWER9 unreliability

We have two Raptor Computing Talos II POWER9 machines. One of these has had issues for some time and cannot run for more than 20 minutes before locking up completely. Over the last few days, our second machine has exhibited similar issues and needs to be power-cycled every ~24 hours. I spent some time today trying to diagnose the issue with the first machine, removing the motherboard as recommended by Raptor support, to see if the issue still exists with nothing else connected. Sadly, it does. I noted that a firmware update is available, which would move from v2.00 to v2.10.

~1 min read
Back to Top ↑

raspberry-pi

Back to Top ↑

registry.ci.dev

Back to Top ↑

snmp

PowerShell SNMP

Potentially, I’ve got a bit carried away here. There isn’t a native PowerShell module to query SNMP which I found a bit surprising. How hard could it be? I’ve got a SYSLOG server and client in PowerShell so this felt like a simple extension. The SNMP client needs to send a request over UDP to the SNMP server on port 161 and waits for the response back. Sending via .NET’s UDPClient is easy enough

5 min read
Back to Top ↑

specturm

Retro Gaming: Space Raiders

Dylan’s favourite t-shirt is his Game Over shirt which always reminds me to Space Raiders from the ZX Spectrum days. I found the cassette tape quite easily but it took a significant amount of searching to find the Spectrum itself and included in the box was the tape recorder as well!

2 min read
Back to Top ↑

swift

Mandelbrot Set 3D

Back in 2015 in one of the earliest posts on this site I wrote about my fascination with the Mandelbrot set.

4 min read
Back to Top ↑

wifi

Back to Top ↑

wordpress

WordPress to Jekyll Test

Install the Wordpress plugins UpdraftPlus. Create a new WordPress site and install the UpdraftPlus plugin and restore the database.

2 min read
Back to Top ↑