autosuspend: Automatically Suspending a Server on Inactivity

A few months ago I sold my existing basic Synology NAS and built my own one based on a power-efficient Intel CPU inside a mini ITX system with a usual Linux as the operating system. This provided me with a lot more flexibility and e.g. possibilities to encrypt my data properly. One thing I needed for this custom solution was a daemon to suspend the system in case of inactivity to further reduce the power consumption. I found a few existing scripts online, started using one of them, but soon had to modify it deeply until it was general enough to suit my needs. Today, I finally took the time to clean up the last issues in the code base and the autosuspend project is now available on Github. ...

November 14, 2015 · updated April 30, 2021 · 2 min

Plotting the Separating Hyperplane of an SVM in 3D with Matplotlib

I have been struggling how to plot the separating hyperplane of an SVM (a One-class SVM in my case) in a 3D space using matplotlib. There was no apparent way how to convert the decision function output into something that one of the 3D plotting functions could deal with. Fortunately I found a solution which I am going to share in case someone wants to do the same. ...

October 29, 2015 · updated April 30, 2021 · 3 min

Managing dotfiles with homeshick

I am constantly using several different computers (home, work, servers) and synchronizing the configurations of the shell and all other command line utilities I am using across these computers can be a bit challenging. Manually copying everything including all changes constantly appearing in the different configuration files is the worst solution. So I have been using a repository on my self-hosted Seafile server with all the required dotfiles and a custom setup script to create the required symlinks to these files. This worked quite well but also had several drawbacks. Therefore, I recently switched to homeshick to manage my dotfiles and, during this process, published most of my dotfiles on GitHub. ...

September 27, 2015 · updated April 30, 2021 · 3 min

A Python logging broadcast handler

I have implemented a handler for the Python logging system called broadcast-logging which sends out the log messages via UDP broadcasts. This might be useful in case you want to sporadically listen to certain log messages, e.g. from a server, without setting up a special service for this purpose. Since broadcasts are sent via UDP and no explicit connections are set up, this might also be useful in case you want to debug TCP-connection-related issues while preventing artificial connections for the debugging session. ...

September 12, 2015 · updated April 30, 2021 · 1 min

matplotlib: Interactively zooming to a subplot

I am using matplotlib a lot for my data analysis tasks and most things work as I expect them to do. One thing that I was missing so far for interactive use was the ability to focus an individual subplot and temporarily let it fill the whole screen for deeper inspection of this plot. In case of multiple subplots, with the standard GUI elements you can zoom and move around inside each subplot (without changing their geometry), but not focus one of them individually. Therefore I came up with the following solution: ...

September 4, 2015 · updated April 30, 2021 · 2 min

pass-git-helper: Integrating the pass password manager with git

I am using password managers since a long time to maintain secure and individual password for different online services. One thing that always bothered me was the missing integration of these password managers with different applications. I started my journey with password managers using KeePassX but recently switched to pass (the standard unix password manager) due to the inherent command line nature and therefore much better integration and remote usage possibilities. Still, there was no easy way to integrate pass with Git (for those repositories where SSH key authentication is not possible) and until recently I still used kwallet as the backend for Git, with all the hassles of duplicated data. To improve on this situation I finally took some time and implemented an adapter between Git and pass: pass-git-helper. ...

September 3, 2015 · updated April 30, 2021 · 2 min

New Site and Static Site Generators

For several years I have been using Wordpress as a platform for my blog. However, I never really needed anything dynamic. The amount of comments was very low and apart from that, I did nothing fancy which required dynamic content. Additionally, I was kind of tired to install Wordpress updates over and over again. So I moved this blog to a static site generator to completely get rid of Wordpress, comparable to what I did a few weeks ago with my photography portfolio. ...

July 19, 2015 · updated April 30, 2021 · 3 min

Letting Enigmail use gpg-agent for passphrase caching on OSX

Since one of the recent upgrades of Enigmail (the GPG extension for Thunderbird) and completely switching to GPG version 2 on my Macbook I ended up with the situation that Enigmail did not cache the key passphrases anymore and I had to enter them over and over again. This is caused by the fact that GPG2 requires to use gpg-agent and Enigmail’s internal passphrase management cannot be used anymore. Therefore, a setup is required that enabled the gpg processes spawned by Enigmail to talk to a running gpg-agent instance. ...

May 3, 2015 · updated April 30, 2021 · 4 min

Revamped FlickrExifTagger moved to Github

I revived the FlickrExifTagger script and updated my own Flickr stream with it to add machine tags specifying the lenses I have been using to all photos I took during the last years. For this purpose I improved the code to better support custom rules and moved the project to Github. During this process I also updated the software section in this blog and used some Wordpress plugin magic to auto-generate an always up-to-date overview page, which I always forgot to update. ...

November 20, 2014 · updated April 30, 2021 · 1 min

Applying the Changes of a Single File from a Git Stash

In order to apply only changes for a selected file from the git stash you can use the following command line (bash): git diff stash@\{0\}^1 stash@\{0\} -- path/to/your/file | git apply Based on the Stackoverflow question: How would I extract a single file (or changes to a file) from a git stash?

June 18, 2014 · updated April 30, 2021 · 1 min