Blog Posts

2026

Printer Rejects USB Drive: How I Fixed It

1 minute read

Published:

I recently ran into a frustrating problem: I wanted to print a PDF directly from a USB stick, but the printer kept showing “memory device is not working properly.” The drive had previously been flashed with Debian, so I assumed deleting the old files and copying my PDF would be enough. This was, of course, not the solution. In this short article, I cover what I did to fix the problem.

Fixing a Broken NVIDIA / GNOME Setup on Ubuntu

3 minute read

Published:

Recently my Ubuntu installation ended up in a broken state after a reboot: external displays stopped working, nvidia-smi failed inside the desktop environment (DE), and the system would hang while stopping gdm during shutdown. Interestingly, the NVIDIA driver still worked in recovery mode, which suggested the kernel modules themselves were not completely broken. I decided to reset both the NVIDIA stack and the DE entirely since I have had issues in the past with GPU weirdness.

How-to: Perform Portable Substitution Using nvim and ripgrep

2 minute read

Published:

Often I have to perform substitution of variables or code blocks with something new as part of refactoring efforts. Since I am using nvim, I wanted a way to do this without having to close nvim, but also taking advantage of highly optimized regex search utilities like ripgrep. In this short how-to, I provide the commands one can use to do this without ever having to close nvim.

Lightweight CI/CD on a Raspberry Pi 3B+: Deploying a Robust Self-Managed GitLab Runner

26 minute read

Published:

If you choose to host a self-managed (i.e. private) GitLab instance on on-premises infrastructure, you do not get access to GitLab’s shared (public) runners for CI/CD. Unlike GitLab.com or GitLab Dedicated, a private GitLab instance puts you fully in control, but that control comes with responsibility: you have to bring your own runners. In this article, I document my experience setting up a GitLab runner on a Raspberry Pi 3B+, why I chose this route, and how I did it. Spoiler: while the setup itself is fairly straightforward, there are some Raspberry Pi–specific hardware quirks that are worth handling correctly if you care about long-term stability and recoverability.

2025

How-to: Enable nvim Color Schemes in tmux Windows

3 minute read

Published:

I am constantly using ssh to remotely login to different compute clusters (e.g., DKRZ’s Levante, ECMWF’s Atos, local clusters at work, etc.). I find it much more convenient to use a terminal-based text editor like neovim coupled with the standard terminal multiplexer tmux in order to switch easily between several programs in one terminal. However, I quickly encountered an issue where my neovim color scheme was not displayed when using it within tmux. Fortunately, there’s an easy fix to this issue that I cover in this article. I first show the problem and the expected behavior, diagnose the error, and then correct it accordingly. I document the solution here and tie to use with legacy systems.

How-to: Update PDF Metadata Using pdftk

4 minute read

Published:

I often download and read scientific journal articles on my Kobo eReader. Unfortunately, the metadata in the PDFs for such journal articles may lack title information. This means that the searchable title that appears for the article once loaded onto the eReader is something very ugly like an uninterpretable string of digits. An easy way to fix this is using the open-source tool pdftk. In this short article, I show how to use pdftk for this purpose.

Extra Mathematical Details: The Steady-State Reaction-Diffusion Equation and its Solution in PETSc

23 minute read

Published:

In this article, some extra mathematical details related to the solution of the steady-state reaction-diffusion equation using PETSc are discussed. First, the simple nonlinear governing equation of interest is shown. Then, Newton’s method is presented at the partial differential equation (PDE) level for generality rather than being presented at the algebraic level. Subsequently, the spatial discretization via the finite difference method is shown for completeness. Finally, a commented PETSc implementation of the discretized reaction-diffusion equation is shown to concretely illustrate how the mathematical notation maps to code.