Monday, 13. May 2024 Week 20
In his 20 year anniversary post, Terence Eden explains how he uses the "On This Day" feature of his blog every morning to look back on what he was writing on this day in previous years.
Finding this very inspiring, I decided to add a similar feature to my blog.
As my blog is built with Jekyll as static pages, some plain old JavaScript was needed to surface the posts of this day without having to rebuild the page daily.
And here we have now the On this day page :-)
Saturday, 11. May 2024 Week 19
The warm temperatures around here made me change the blog theme back to the warm colors ☀️
Basically it's a revert of the winter layout changes from beginning of the year, while keeping all the HTML modernizations done afterwards :-)
We're back on the original 2002 layout (with modern HTML), for those trying to keep score. Enjoy!
What if Marie Kondo would become a software engineer?
Ben Buchanan did run a parody account on this topic and has archived the posts on his site.
There are some gems :-)
To choose what to keep and what to throw away, take each dependency in one's manifest and ask: "Does this spark joy?" If it does, keep it. If not, remove it from your codebase.
We should be choosing what to .gitkeep
, not what we want to .gitignore
Cruft has only two possible causes: too much effort is required to refactor or it is unclear where things belong.
Sunday, 5. May 2024 Week 18

"If you don't fit... Maybe you haven't found the right puzzle." — Admiral Wonderboat (via)
Due to a hardware failure I had to replace one of my computers (switching from a 2015 Intel NUC to a Dell OptiPlex Micro 7010).
After moving the disk to the new system, it refused to boot (claimed that no bootable drive was available).
Turns out that the new system only supports UEFI booting and the existing disk was setup for 'legacy'/CSM boot.
I used the following steps to convert the existing disk to UEFI boot (while keeping all data on it available).
They are inspired by the excellent Switch Debian from legacy to UEFI boot mode guide from Jens Getreu.
- Disable secure boot in the BIOS to allow booting from an USB stick.
- Create a bootable USB stick with a Debian live system (see my previous post)
- Boot into the Debian live system
- Identify the disk to work on (
/dev/nvme0n1
in my case)
- Convert the partition table from MBR to GPT:
# gdisk /dev/nvme0n1
r recovery and transformation options (experts only)
f load MBR and build fresh GPT from it
w write table to disk and exit
- Install gparted into the Debian live system:
# apt-get install gparted
- Create an UEFI partition and a partition for Grub2:
# gparted /dev/nvme0n1
Resize an existing partition to create space (does not need to be at the beginning of the disk, I used the swap partition).
Create a new 100MB partition for efi (named "Efi partition"), format it as fat32
and flag it bootable
.
Create a new 50MB partition for Grub2 (named "BIOS boot partition"), keep it unformatted.
- Use gdisk to set proper partition codes (
EF00
for the efi partition and EF02
for the Grub2 partition):
# gdisk /dev/nvme0n1
p print the partition table
t change a partition's type code
t change a partition's type code
w write table to disk and exit
- Chroot into the on-disk root system:
# mount -t ext4 /dev/nvme0n1p1 /mnt
# mkdir /mnt/boot/efi
# mount /dev/nvme0n1p2 /mnt/boot/efi
# mount --bind /sys /mnt/sys
# mount --bind /proc /mnt/proc
# mount --bind /dev /mnt/dev
# mount --bind /dev/pts /mnt/dev/pts
# cp /etc/resolv.conf /mnt/etc/resolv.conf
# chroot /mnt
- Update /etc/fstab:
# ls -lisa /dev/disk/by-uuid
Identify the UUID of the EFI partition (usually in the format XXXX-XXXX
) and add a corresponding line to /etc/fstab
:
# echo "UUID=XXXX-XXXX /boot/efi vfat defaults 0 2" >> /etc/fstab
- Install grub-efi and install Grub2 to the EFI partition:
# apt-get remove grub-pc
# apt-get install grub-efi
# grub-install /dev/nvme0n1
- Exit the chroot and reboot the system:
# exit
# reboot
- Select the Debian bootloader (
/EFI/debian/grubx64.efi
) in the UEFI BIOS and make it the default :-)
Needed to create a bootable Debian USB stick for some maintenance on one of my computers.
Here are the steps so I won't have to search for them the next time :-)
- Download the Debian live CD image
- Connect your USB stick and find its device location (/dev/diskX) with:
sudo diskutil list
- If needed unmount your USB stick:
sudo diskutil unmountdisk /dev/diskX
- Write the downloaded image onto the USB stick:
sudo dd if=./debian-live-12.5.0-amd64-standard.iso of=/dev/diskX bs=1m
Wednesday, 24. April 2024 Week 17
Tiny Fragments is a fun little puzzle game made by Daniel Moreno (via)
Tuesday, 23. April 2024 Week 17
Interesting article explaining how to test HTML with visual CSS highlighting: Testing HTML with modern CSS (via)
Monday, 15. April 2024 Week 16
In the Print HTTP Headers and Pretty-Print JSON Response post, Susam Pal shows a nice trick to pretty-print JSON output with jq from curl while also showing the HTTP response headers (using stderr):
curl -sSD /dev/stderr https://some-URL-returning-JSON | jq .
Saturday, 13. April 2024 Week 15
Modern Git Commands and Features You Should Be Using — a short article from Martin Heinz about some new-ish (>2018) features in Git, that 'can make your life so much easier'.
TL;DR:
git switch <branchname>
git restore --staged <somefile>
git restore --source <commit> <somefile>
git sparse-checkout
git worktree
git bisect
Similar post from five years ago: More productive Git