Documentation
Nix
I wish I knew about this command earlier:
Docker/Podman
I keep forgetting the -p syntax
Latex
There is a way to get latex to insert empty lines automatically when starting a paragraph automatically. Just add the following to your preamble:
Haskell and adjacent languages
I keep forgetting the difference between foldl and foldr
The foldl function starts from the left of the given list and moves to the right.
foldr starts from the right and moves its way to the left.
fold(l|r)(1|) take the first encountered element in the given list as accumulator
scan(l|r)(1|) does the same as fold, but prints the intermediate steps
Development meta packages
Distros have meta packages with common development utilities like gcc, make and git. For some reason each distro has it's own idea on what it's meta package should be called. Here are some of the names I figured out so far.
- Alpine - apline-sdk
- Arch - base-devel
- Debian - build-essential
- Void - base-devel
PGP gripes
If you use pass as password manager install pinentry as well.
It'll make your life a lot easier.
It is a graphical interface for you to mash the passphrase for your PGP key into.
ZFS
Android
Since Android 15 there is this "private space" feature. It allows you to have a seperate context for various apps besides using a completely different user profile. Or at least thats how it presents itself. This is all well and good and a really neat feature, but by default you are limited to installing apps using the default app source on your device.
Through some digging I found out that it is indeed just a different user profile but in a different coat of paint. With this knoweldge I figured out how you can install apps adb- and expose already-installed apps to the "private space" user using adb.
First you need to get the user ID of the private space.
You do this with the following command:
This will then output something like the following:
The first field of the 'UserInfo' object is the user ID; 11 in the example above.
Armed with this knoweldge, you can install apks from your system using the '--user' flag:
Handy little blogpost I followed:
Android private space: How to install apps from other sources by René Mayrhofer
However, if you want to install an apk that already resides in any of the other profiles on your device, you will get an error. Instead you will have to expose the given app to the "Private space" user like you would with any other profile. To do this, you can use the following command:
I have no idea about the privacy and security rammifications about this, so do this at your own risk.
In order to get the name of a currently-installed app, you can use the following oneliner:
Windows is a terrible OS
Remove a bunch of its bloatware with this.