This is a little hack that allows you to multi-boot comfortably without having to wait for the bootloader menu and deal with unnecessary reboots in case you missed it. My use case is a headless PC that either runs Windows with a VR headset attached or Linux to serve SSH sessions as a GPU-enabled development machine. To select the OS, I use a plain USB flash drive. If the flash drive is attached,…
In my opinion, the reMarkable 2 is a great device for distraction-free reading/writing tasks. To make use of spaced repetition learning, I wanted to be able to write flashcards on it and then have them show up in Anki . The idea Each page of the notebook looks like this: Template for flashcard creation Then you can fill out both “sides” of a card on a single page. The front will show up as a…
I have in my possession a WearOS smartwatch. I used to have a Colmi P8 and even wrote a post about it, but sadly I have lost it. While the firmware of the WearOS watch is decent, nothing beats a home-cooked meal . With the start of the winter semester this month, a perfect use-case presented itself: my daily commute. It consists of three parts: walking out the door, getting to my bicycle, riding…
I recently used Icecast and GStreamer to stream music playing on my Linux desktop to an old internet radio that does not have Bluetooth. In case someone finds themselves in a similar situation, here are the commands: Icecast installation & configuration On ArchLinux, simply sudo pacman -S icecast . Then, change the configuration file /etc/icecast.xml : Change the passwords to make sure no-one else…
While sometimes leading to interesting and unexpected insights, the net can also be a constant stream of distractions. More than once have I found myself switching to the browser when presented with a difficult programming challenge, not to do research but to procrastinate by seeing what the rest of the world is up to. Because if the solution to your bug is just a Google Search away, so is Reddit,…
Last year, when I first read about the PineTime smart watch, I got really excited. Screw expensive Apple Watches or data-harvesting fitness loggers, I want to be able to create my own watch faces and peek at the firmware! Because if you can’t hack your gadget, do you really own it? Installation Notes for the Colmi P8 Skip this section Alas, ordering a PineTime watch from the Hong Kong-based Pine…
Debugging programs that run in parallel can be really difficult. It is hard to keep track of state across multiple processes and observe bugs that are timing-dependent, such as deadlocks. This post will not solve any of these problems, but at least it will show you how to easily attach a debugger to a C++ program that uses the Message Passing Interface (MPI). This is a quick tip in two parts. Part…
I have a program for you. This is its source code: Toggle Zoom int f = 0 ; char * l = \ "int#life[]={99,-1,99,-1,99,-1,99,-1,99,-1,99,-1,-2,10,79,10,-1,10,25,3,4,3,2,6,1,7,28,10,-1,10,25,3" ",4,3,2,6,1,3,32,10,-1,10,25,3,4,3,2,2,5,6,29,10,-1,10,25,3,4,3,2,5,2,6,29,10,-1,10,25,3,4,3,2,5,2,3" ",32,10,-1,10,25,6,1,3,2,2,5,7,28,10,-1,10,25,6,1,3,2,2,5,7,28,10,-1,10,79,10,-1,-2,10,3,3,2,3,4,3,2"…
If you use a Raspberry Pi as a microserver, it might be a good idea to keep an eye on various metrics. In this article, I will show you how to set up collectd , a metrics collection daemon, InfluxDB , a time series database which will store the collected data, and finally Grafana , to display a dashboard. The final result will look something like this. Preparations I will assume you already have…