Provides random music genres



App::Raps2 v0.54
CLI password safe
Travel-Routing-DE-VRR v2.17
Interface to EFA-based itinerary services
Travel-Status-DE-DeutscheBahn v2.03
Interface to HAFAS-based arrival/departure monitors
Travel-Status-DE-VRR v1.15
Interface to EFA-based departure monitors

Firmware and Hardware

I²C moodlight
VUSB-I²C v0.02
USB ↔ I²C adapter


These projects are neither developed nor maintained any more. Some do offer basic functionality, though.

App::Slackeria v0.12
Project status overview


Travel-Status-DE-IRIS-1.22.tar.gz (signature)

  • Add delay code 4 (unforeseen staff shortage, thanks to Fabian Schwarz)
  • Add delay code 37 (technical failure in carriage, thanks to @marudor)

To increase flash lifetime and avoid problems with unexpected power cuts, I run all of my embedded Linux systems from a readonly root filesystem. This is a moving target: Depending on the software in use as well as the version and configuration of systemd and userland software, different adjustments may be needed.

I have created a readonly linux reference page containing all tweaks I know of at the moment, which are mostly tmpfs mounts and /etc/tmpfiles.d entries. I'll update it when I run by something new.

Preseeding is a handy way of automating Debian installations. With a proper preseed.cfg, a Debian installation can run completely unattended in about 10 minutes, including setup of users, sudo and SSH keys.

For future reference, here are the things I found helpful

custom post-installation commands

d-i preseed/late_command executes arbitrary commands after the installation is completed. I use this to set up SSH keys and sudo, like so:

in-target mkdir -p /root/.ssh /home/derf/.ssh; \
in-target wget -O /root/.ssh/authorized_keys https://.../keys-root; \
in-target wget -O /home/derf/.ssh/authorized_keys https://.../keys; \
in-target chmod 700 /root/.ssh /home/derf/.ssh; \
in-target chmod 600 /root/.ssh/authorized_keys /home/derf/.ssh/authorized_keys; \
in-target chown -R derf:derf /home/derf/.ssh; \
apt-install sudo; in-target adduser derf sudo

Adding preseed.cfg to virt-install images

--initrd-inject embeds arbitrary files into the root of the installation image. So, for preseeding, just add --initrd-inject .../preseed.cfg to your virt-install invocation.

Adding preseed.cfg to USB images (with UEFI support)

This is a bit more tricky. Basically: Download and unpack ISO, inject preseed.cfg into initrd, refresh md5sums, rebuild ISO and add UEFI support.

The following script should do the job for most amd64 systems. Usage: ./mkpreseediso debian-x.y.z-amd64-netinst.iso


set -e

WD="$(mktemp -d)"

7z x -o$WD $ISO

cd $WD

gunzip install.amd/initrd.gz
cp /tmp/preseed.cfg .
echo preseed.cfg | cpio -o -H newc -A -F install.amd/initrd
rm preseed.cfg
gzip install.amd/initrd

find -follow -type f -print0 | xargs --null md5sum > md5sum.txt


xorriso -as mkisofs -o $ISO -isohybrid-mbr /usr/lib/ISOLINUX/isohdpfx.bin \
-c isolinux/boot.cat -b isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 \
-boot-info-table -eltorito-alt-boot -e boot/grub/efi.img -no-emul-boot \
-isohybrid-gpt-basdat $WD

Travel-Status-DE-IRIS-1.21.tar.gz (signature)

  • Fix crash when receiving invalid XML due to network issues

findmnt --raw --noheadings --output options --target SOME_DIRECTORY | grep -qE '(^|,)ro($|,)'

  • findmnt is a handy alternative to mount when writing scripts
  • SOME_DIRECTORY does not have to correspond to a mountpoint. If it doesn't, findmnt will traverse its parent directories until it finds the corresponding filesystem / mountpoint.
  • a simple grep ro would also match options like errors=remount-ro, so we make sure to only match the single ro option. It must be delimited by commas or the start/end of the option string.

Travel-Status-DE-IRIS-1.20.tar.gz (signature)

  • Use schedule instead of realtime data when determining whether a train falls within the lookahead time frame. This fixes severely delayed trains being ignored even if their scheduled arrival/departure is very soon or has already passed.

Travel-Status-DE-IRIS-1.19.tar.gz (signature)

  • db-iris: Fix -ot ignoring arrival delay if departure is on time
  • Add delay code 12 (waiting for passengers in a ship)
  • Result->route_interesting: Include dutch and swiss central station names
  • Result: New accessors arrival_delay and departure_delay

I have a set of maildirs (one for each mailing list / other context) and want to know which of them contains unread mail without firing up my MUA.

Luckily, this is easy to do on the commandline without even looking at mail contents, as there's (mostly?) two kinds of unread mail:

  • new and unprocessed mail. These messages are stored in Maildir/new, so if there's anything in there, it's an unread mail
  • new but no longer "Recent" mail. These messages have not been read yet, but have already been transferred to a MUA using a Read-Write operation, causing them to be marked as no longer new on the server side. They are stored in Maildir/cur alongside read mail, but do not have the "Seen" (S) flag set.

This is easy to check with zsh globbing: new/*(N) expands to a non-empty list if new and unprocessed mail is present, and cur/*~*,*S*(N) expands to a non-empty list if old but unread mail is present. Note that it requires the extended_glob zsh option to be set.

Travel-Status-DE-IRIS-1.18.tar.gz (signature)

  • Update station dataset to Open Data Haltestellenliste 2017-09

Travel-Status-DE-IRIS-1.17.tar.gz (signature)

  • Fix DS100 codes for Dülmen, Stuttgart Hbf (tief), and Wolfenbüttel
  • db-iris: Support -d/--date tomorrow

Travel-Routing-DE-VRR-2.17.tar.gz (signature)

  • Handle routes containing cancelled connections
  • Allow date to be specified as 'tomorrow'
2017-11-29 00:00

mqtt-multipub v0.01

mqtt-multipub-0.01.tar.gz (signature)

  • Initial release
  • Supports publish/retain message types and reading message body from files

TIL: If esptool can successfully communicate with an ESP8266, but the chip seems stone dead otherwise (i.e., no flashed programs work), it may be due to a wrong flash mode.

Debugging aid:

  • The ESP8266 bootloader sends some debug output at 74880 baud after each reset.
  • This baud rate is not supported by screen – miniterm.py (provided by python-serial) can handle it just fine, though.
  • If it complains about a “csum err”, you probably flashed the wrong file / at the wrong address / used the wrong flash mode (there are differences e.g. between various NodeMCU / D1 mini shipments!)
  • esptool -fm dout seems to be a safe (but slow) fallback

Travel-Status-DE-IRIS-1.16.tar.gz (signature)

  • Fix miscalculated delays of prematurely terminating trains
  • Lookahead and lookbehind are now interpreted with 1-minute granularity. Note that this also affects the default lookahead.
  • Fix floating point-related test failures on some architectures
  • New ./Build test dependency: Test::Number::Delta

Travel-Status-DE-VRR-1.15.tar.gz (signature)

  • Fix encoding issues caused by recent API changes

Travel-Routing-DE-VRR-2.16.tar.gz (signature)

  • Fix encoding issues caused by recent API changes

Travel-Status-DE-IRIS-1.15.tar.gz (signature)

  • Performance improvements
  • Distinguish between cancelled/additional arrivals and departures
  • Travel::Status::DE::IRIS::Result: New accessors arrival_is_additional, arrival_is_cancelled, departure_is_additional, departure_is_cancelled and is_additional.
  • Travel::Status::DE::IRIS::Result: is_cancelled now only returns true if both arrival and departure have been cancelled.
2017-04-05 00:00

ekgping v1.32

ekgping-1.32.tar.gz (signature)

  • Add -l / --volume option

Travel-Routing-DE-VRR-2.15.tar.gz (signature)

  • Remove support for Vorarlberger Verkehrsverbund (VVV) backend (no longer working, apparently superseded by non-EFA software)
  • Update EFA URLs for Verkehrsverbund Rhein-Ruhr (VRR2) and Verkehrsverbund Rhein-Neckar (VRN) backends
  • Add support for Braunschweiger Verkehrs-GmbH (BSVG)