-
Practical Type Punning in C++11 and higher
Type punning (treating an object as if it were another one) is common in C++ code bases, yet most of the time it technically is undefined behavior. Typically it is used when reinterpreting bytes received from a network socket as a POD-struct. This article tries to answer two questions: Why should I not use
reinterpret_cast
? and What to use instead? It is heavily inspired by Timur Doumler’s talk at CppCon 2019. -
Setting up Docker in Docker (dind/socket) with GitLab Runners
GitLab’s Continuos Integration / Delivery (CI/CD) workflow utilizes GitLab Runners which can be registered with the GitLab instance to execute individual CI/CD jobs. Depending on the Runner configuration, the jobs are executed in a different environment. Whereas in the Shell Runner commands are executed directly on the runner host, the Docker Runner spawns a new Docker container for each job. This post describes how to setup a Docker Runner that is able to build and run Docker images with bind-mounts.
-
The Curious Case of the Impossible Checksum
Naturally, as a software developer being confronted with less-than-optimal software, the threshold for annoyance-caused re-implementation of proprietary apps is quite low. In this particular instance I wanted to use my phone to control the resistance of my stationary exercise bike (Kettler Racer S). Proprietary Android apps can be used to automatically regulate the resistance of the trainer via Bluetooth according to an exercise plan you pick. To quote GitHub user “kaegi”, the usability of aforementioned apps ranges from “bad-user experience” to “non-functional”. I decided to take matters into my own hands and implemented the Bluetooth protocol for controlling the trainer, causing me to uncover a surprisingly stupid implementation bug in the firmware.
-
Why Your Samba Configuration Does Not Work
Bending the Samba/smbd configuration to enable file sharing between Linux-Linux or Linux-Windows desktop has always been a personal pain point of mine. Unsurprisingly few other topics on Linux desktop are being discussed so frequently among Linux desktop enthusiasts. Most users end up with a patchwork of smbd configuration options, leaving them with a dysfunctional and insecure system. This post intends to provide an overview of a basic smbd configuration that is compatible with Windows 10 systems.
-
urxvt and Emacs - The Ultimate Guide
One of the major advantages of Emacs is that in addition to working on graphical interfaces, it can be used from a terminal as well. However, some features (such as many keybindings) are not available when using Emacs in terminals, due to ancient protocol limitations. This post shows how to make the most of Emacs on a terminal (urxvt).
Older Posts
- — Don't Trust Java's Method Overloads
- — When to Use C++17 std::string_view?
- — Quick and Beautiful Figures in LaTeX without TikZ
- — Reverse Engineering OruxMaps' Preference Encryption - Part 2
- — Reverse Engineering OruxMaps' Preference Encryption - Part 1
- — Citrix: Opening Skype Causes Mouse Freeze
- — Finding Corrupt Files on a Raspberry SD-Card
- — Wemos D1 Mini Pro Digital Interrupt Pins
- — Extracting Thunderbird Unread Emails Count
- — My Experience with systemd-homed
- — Comfortable Screen Recording
- — How To Write Unmaintainable Makefiles - Part 1
- — Read and Write SPI Flash on a ESP8266 based board
- — Using Multiple Node Versions Without nvm
- — Bundling Dynamic Dependencies in Webpack
- — Motivation for this Blog