How to create a menu bar shortcut to toggle system theme on macOS
Open Automator and create new Workflow. Find "Change System Appearance" action in the library and drag it to the right (or just click twice). Save (⌘ + S) the workflow to the ~/Library/Scripts directory (press ⌘ + Shift + G to enter path)....
"Picture-in-Picture" YouTube view on macOS using Apple Script
While my shell function for youtube viewing is nice, it requires opening a terminal everytime you want to use it. Let's improve user experience a bit....
Making cgit show real idle time after migration
Look at the source of cgit's get_repo_modtime function: https://github.com/zx2c4/cgit/blob/master/ui-repolist.c#L35. When agefile is not present, it just reads mtime of refs/heads/master (or other head) and uses it in the idle column in the UI....
Running glibc applications on musl libc Void Linux installation
TLDR: use voidnsrun Some time ago I got tired of Gentoo and decided to try Void Linux. They officially support musl libc, so I thought why not? and installed it on my main working machine....
cbfstool with musl libc: segmentation fault
cbfstool is a coreboot utility for manipulating CBFS. Apparently nobody uses it on musl system because it doesn't work: $ ./cbfstool Segmentation fault Let's check it with gdb:...
"Picture-in-Picture" mode for YouTube videos in 4 lines of bash code
Add this function to your ~/.bashrc: youtube-stream-mpv() { local title=$(youtube-dl -e "$1") local mpvopts="--force-seekable=yes --ontop" if [[ "$OSTYPE" == "darwin"* ]]; then mpvopts="$mpvopts --ontop-level=window --on-all-workspaces --macos-app-activation-policy=accessory" fi...
isv: Linux utility for controlling Voltronic hybrid solar inverters
Update from 2022: isv is no longer supported, please use inverter-tools instead. Long story short, I have this thing called InfiniSolar V 5kW:...
Importing PKCS #12 client certificates in Firefox on Android
Root access is required. Tested on Fennec 68.11.0esr from F-Droid. First, get root shell on your device. $ adb shell $ su...
How to fix dbus and shell prompt startup delays on SysVinit Debian 10
After installing sysvinit on Debian Buster and rebooting, the startup pauses for a minute or two at Starting system message bus.... And then, when you finally type your login and password and hit enter, bash also freezes for a minute before showing you a prompt....
Fixing "Stopping remaining crypto disks..." in SysVinit Debian and Devuan
SysVinit Debian/Devuan installations have this problem: encrypted disks are not properly unmounted during shutdown, which results in this: In the end, after some timeout, it just fails with an error. Quite famous bug, it seems: But we will not tolerate it, will we? Run vgdisplay and lvdisplay....