Category: Linux
-
Dealing with latency sensitive processes on Linux
We’ve had an issue with players complaining about micro lags on our DotA bots over the summer for no apparent reason. After lots of debugging and well timed clues from the players, I pinpointed the problem to non-bot processes spiking the CPU and causing this lag as a consequence. Even a simple thing like logrotate…
-
ZFS on Debian: load-key keyboard issues
I have a systemd service which decrypts my ZFS dataset on boot. It essentially runs /usr/sbin/zfs load-key -a but randomly on some boots, my password is “incorrect” and by experimenting I figured out that if I type everything slowly it works almost every time, but if I type it fast it regularly fails. I suspect…
-
Automatically resize cloud VM filesystem when disk size increases on Linux
One of the good things that cloud brings is that you can easily increase size of your VM disks as they fill up. Unfortunately the process is a bit manual because you also need to resize your filesystem in order to see the change. GCP has this process documented. We can automate this with a…
-
Using extra mouse buttons to quickly switch to a task in KDE
I had a bright idea to use my extra 2 mouse buttons to quickly switch to a task in Debian KDE, for example to terminal or browser. Since the mouse is in the palm of your hand most of the time this is quite a bit faster than actually clicking on a task or hitting…
-
An OpenSprinkler success story
I wanted to automate the watering system at home preferably using open-source and DIY systems. The initial plan was to go with plain RPi, OpenHAB and some GPIO code driving the sprinkler valves but the problem was creating a useful UI to control the system since OpenHAB is too clunky and generic looking. I was…
-
Apache http to https redirect – use 307
Who knew that a simple thing like HTTP redirects would be so complicated? It turns out clients will just change POST to GET on 301 (Postman, curl, everyone?), same with 302 which really behaves like 303 and that is also an old implementation “bug”. Yeah, seriously. If you have a REST API with POST (or…
-
Setting env variables with hyphen and running a program
Docker compose allows you very unrestrictive naming of your environment variables. It allows you to use hyphen and other “special” characters in variables names. When you need to use these variables in regular shell you are out of luck, bash and many other shells do not allow hyphens in variable names. But this is merely…
-
Updating server from Debian Stretch to Buster
Not the most pleasant experience.. I expected a smoother upgrade from Debian team. Upgrading from 8 to 9 was a walk in the park compared to this. 1. MySQL silently fails to start after upgrade MySQL was left behind at version 5.5 after upgrade and would just not start anymore, probably segfaulting. There is no…
-
Creating a new torrent and seeding with Transmission
You have setup a Transmission server on your Linux box together with Transmisison Web or something along those lines and now you are wondering.. how can I actually seed a NEW file? I couldn’t find a straightforward answer on the web so here is the short tutorial: Upload your file to your transmission download directory…
-
Ubuntu 18.04 on MacBook Pro 11.5 – a sad state of affairs
There was an extra MacBook Pro 11.5 lurking around so I decided to install Ubuntu 18.04 on it and try to setup a usable workstation. A culmination of several issues prompted me to not pursue this setup further. Linux drivers and MacBook hardware just don’t play along very well. Display flickering/corruption on main display The…