Skip to main content

Navigation

User login

Elsewhere

LinkedIn

Hosted by Sargasso Networks
World of Goo Fans!

Allowing Wordpress updates to actually work via SSH

September 11, 2020 by davidc

In a world where FTP has finally been turned off by most ISPs, Wordpress allegedly supports SSH2 for upgrades instead, using FS_METHOD ssh2. However it fails to work in any real-world scenario because it assumes the filesystem paths on the remote host are the same as on the local filesystem.

This obviously fails with pretty much any ISP on earth as the users are chroot()ed, so a directory that was once perhaps /home/david/www.davidc.net would in fact be just /www.davidc.net when accessed over SFTP.

Check Maildir usage versus quota

June 30, 2020 by davidc

This script allows you to check virtual users' Maildir sizes compared with the quota, and produces a simple list of addresses that are overquota, which can be used for example by mail delivery agents to reject incoming messages when the user is overquota.

Fallback PPPoE credentials on RouterOS

June 26, 2018 by davidc

RouterOS has no native concept of fallback PPPoE credentials. You can only enter one username and password per interface. Sometimes you would like to enter a fallback set that are tried if the primary credentials don't work, for example to prepare for a migration. Here is a RouterOS script to handle fallback PPPoE credentials that will be tried one after another until one set succeeds.

Converting Acrobat checkboxes to radio buttons

June 19, 2016 by davidc

Acrobat's automatic form generation is atrocious. It inevitably gets almost everything wrong, meaning you have to recreate it by hand. It boggles the mind that it's had the ability to create forms for 20 years now, and still has no way of automatically creating the form from a Word document without a buggy and and half-hearted attempt at auto-detection. You'd think at the very least it would be able to turn Word form elements into PDF form elements, but no.

Restoring yanked messages to the Qmail queue

December 8, 2014 by davidc

qmail-remove provides a means to easily remove messages from the Qmail queue, but restoring messages is rather more complicated. Here is a quick shell script that will allow messages to be correctly restored, undoing the yank.

Cisco routers with German VDSL2

December 5, 2013 by davidc

Customers wishing to use their own router with VDSL2 (FTTC) services in Germany are hampered by the CPE not supporting PPPoE passthrough, as Telekom limits the line to 1 PPPoE session. The CPE therefore needs to be replaced entirely. This article describes how to extract the login information from an O2 Homebox and then configure a Cisco router as a replacement CPE.

Automatically exporting USB drives over Samba

August 23, 2012 by davidc

For my new NAS, I wanted newly-connected USB disks to be automatically mounted and then exported over Samba. Debian's usbmount program is used to handle the mounting, and a couple of scripts handle the Samba export.

Snaxe on a breadboard!

September 21, 2011 by davidc

Since I just got my lovely (and cheap) DOGS102 LCD module and an PS2-style thumb joystick, I thought it might be a good first exercise to get Snaxe running on my Teensy.

Snaxe

September 19, 2011 by davidc

This is a simple multiplayer version of the classic Snake game, developed in 16 hours for the Überall video game party. It features network play, with mobile phone or laptop controllers, for 2-8 players per game. It can also be played with up to 4 players on the local keyboard, or with a combination of both network and local players.

Snaxe: Hours 15-16

September 16, 2011 by davidc

I've added one more powerup, 'speed', which doubles your movement rate (effectively letting you get extra moves in between everyone else's moves) for 15 moves. Also finally implemented a smart algorithm to determine how many rabbits to spawn and how often to spawn them and the other powerups. Minimum and maximum rabbit numbers are determined by the number of players in the current game.

Added a new skull and crossbones icon besides dead players, keeping their colour (but faded out) so you can quickly see who is dead.