Blog posts

Upgraded to Drupal 9!

Submitted by HighKing on Fri, 02/11/2022 - 22:30

This site has been created around 2007 with Drupal 6, upgraded to 7 a few years later. Now the time has come to upgrade again.

Oh, wait... you can't. Drupal 7 and 8 or 9 are fundamentally different so you'll have to migrate all data from the old Drupal 7 installation to the new Drupal 8 or 9 one. I went straight to Drupal 9.

The basic process was explained pretty clearly on this page:

Disable swipe-left back gesture on Android 11

Submitted by HighKing on Thu, 03/25/2021 - 20:48

This one I found really annoying when I bought a new phone with Android 11. Both swiping left AND right makes it jump back to the last thing you were doing. I found myself accidentally swiping left... a lot.

Unfortunately Google didn't give us an option to disable this annoying behaviour from the phone itself, but it can be disabled pretty easy with adb. You do not need to root your phone for this but you do need the developer tools with usb-debugging enabled (which you can disable directly after if you wish).

Getting passwords from KWallet on the cli

Submitted by HighKing on Wed, 01/29/2020 - 12:17

After a few years of using a Mac professionally I switched back to using Linux again. I'm using KDE because I'm most comfortable with that.

If you use KDE, you automatically use KWallet to store stuff like your wifi-password so you don't have to remember that yourself. It's encrypted but will be unlocked when you login. I wanted to use that to automount some cifs shares so I don't have to put my password in a plain textfile.

Integrate Nagvis maps nicely in Check_MK

Submitted by HighKing on Mon, 05/22/2017 - 15:59

Check_MK has build-in dashboards you can create and alter from within the Check_MK webinterface. However, they do not (or at least not at this moment) give you the opportunity to create a single icon that represents a group of checks together like Nagvis. Fortunately, the current check_mk builds (both the enterprise and raw editions) comes with Nagvis preinstalled. Nagvis, on the other hand, does not handle check_mk dashlets like graphs or the status-globe. So, in order to use both on one dashboard we'd have to mix things up a bit.

Human-readable json-output with a python one-liner

Submitted by HighKing on Thu, 02/23/2017 - 14:08

I was trying to get some metrics from a service that outputs in json and copy-pasted the output into an editor and used a json-plugin to order the output in a human-readable way. While this works fine, I thought it would be easier to write a one-liner that parses the json-output and pretty-prints it on my screen.

That way it would be easier for me to read. Also I can now use grep on the output to search for specific metrics.

The one-liner uses python to read and dump json-output. Here it is:

Automatically rip audio cd's

Submitted by HighKing on Wed, 10/26/2016 - 09:21

Whenever I buy a new audio cd I use my laptop to rip the music to disk and place it on my server so that we can listen to it using a Raspberry Pi with Kodi. So, I bought myself an new and shiny laptop... but the thing does not have a cd/dvd-player! Oops... now what? Keep my old laptop just for cd ripping purposes?

I figured it would be kinda cool to attach an old usb DVD-player to the Raspberry Pi and make it rip the contents of every audio cd inserted automatically.

So, I created an udev-rule that triggers a bash-script whenever an audio-cd is inserted into the drive:

Tmux-integratie iTerm2

Submitted by HighKing on Fri, 08/05/2016 - 10:47

Leuk, thuis inloggen op een machine via ssh met gebruikersnaam, wachtwoord en een tijdelijke token.
Dan een nog een sessie openen, weer je wachtwoord en een token intikken.
En nog een keer, en nog een keer... onhandig!

Wat blijkt? iTerm2 (ja ik werk op een Mac) kan prima integreren met Tmux!
Wat is Tmux? Nou, da's net zoiets als screen, dus meerdere sessies kunnen draaien binnen 1 login... maar screen heeft zo zijn beperkingen zoals standaard geen scrollback en 't uit je hoofd moeten kennen van toetscombinaties om van sessie naar sessie te schakelen.

IP-adressen sorteren met 'sort'

Submitted by HighKing on Wed, 08/03/2016 - 13:56

Leuk, ip-adressen listen... als je normaal gesproken bijvoorbeeld ip-adressen .1 t/m .10 op een server hebt en je probeert ze te sorteren dan krijg je iets als dit:

Maar die 10 zie je toch liever netjes onder de 9, niet?
Wat je kunt doen is sort inlichten over het feit dat de punt een scheidingsteken is en vervolgens per veld sorteren. bijvoorbeeld als volgt:

Monitoring java memory-usage with Check_MK

Submitted by HighKing on Mon, 08/18/2014 - 16:29

After running out of memory with a Java application, I wanted to monitor the internal Java memory usage.

It cost me quite some time trying to get the information I seeked from JMX, still have not figured that out. Suddenly I ran into a simple Nagios-plugin that utilizes the jstat-command to just get the heap- and permgen usage from a java-process. The original plugin can be found here: