I keep acquiring useful tidbits of knowledge.  They should be documented for other's benefit.  I've gone too long
    wanting for an appropriate place to dump these things.  There's probably a wiki somewhere, but I haven't found it
    yet.  So for now I'm going to leave them here.
    
     TinyFugue needed a spell checker.
    Everything supports spellcheck on the fly these days except TF.  One day I'd had enough waiting and did it myself.
    Get the latest and greatest here: kaispell.tf.  Older
    versions are available too if you're curious how the thing
    evolved from a quick hack to a grandiose hack.
    
     The Windows "Offline Files" feature kinda sucks. 
    I don't know about y'all, but it keeps messing up for me - it gets out of sync, spews tons of sync errors, won't
    ever go back online, pretends to delete my offline copies but doesn't actually delete them, and keeps them around
    even after I uncheck the "Always available offline" checkbox.  Here's the only way I know to fix it:
    resetofflinefiles.reg.  Right click, save-as, then run it.  This will reformat your
    offline files database on the next reboot.  I discovered the technique
    here
    and turned it into a reg file because I seem to need it a lot.
    
     Associating files on Debian/Gnome
    When you right-click, open-with, you might not find the program you want.  There's no way to enter a custom one.
    Tutorials always point you toward creating .desktop files and fooling with xdg-open and gvfs-open and ... I dunno, I
    always get lost every time I have to do it.  I stumbled across an easy way:  "mimeopen -d (filename)".  You can then
    set a custom command and it creates a correctly-formatted .desktop file in ~/.local/share/applications.  That's a
    lot more handy than figuring it out every time.  You might need to run update-desktop-database.
    
     ecryptfs stupidity
    "mount(2) system call failed: No such file or directory."  Fix:  "sudo keyctl link @u @s", then try again.
    
     neat tools
    
Network: iftop nload flowtop
    
nmon: monitor everything
    
detox: fix stupid filenames
    
jc: make unix commands output JSON
    
jq: JSON swiss army knife
    
gron: make JSON greppable
    
visidata: CSV TSV JSON SQLite spreadsheet/browser
    
bat / batcat: syntax highlighter
    
btdu: fast sampling du for btrfs
    
execsnoop: watch all new processes
    
vidir: rename and delete
    
lnav: powerful logfile read/search/query/more tool
    
btop (graphs), ctop (containers)
    
hyperfine: CLI benchmarking
    
subtrace: wireshark for docker services
    
     THE BEST way to map CapsLock to Ctrl
    is to do it in Linux instead of in X.  That way it works on the terminal too, and there's no jank with programs
    which handle their own keycodes.
    
The old way: setxkbmap -option ctrl:nocaps
    
or setxkbmap -option caps:ctrl_modifier
    
The better way:
    
cat >/etc/udev/hwdb.d/70-keyremap.hwdb <<EOF
evdev:atkbd:dmi:bvn*:bvr*:bd*:svn*:pn*:pvr*
 KEYBOARD_KEY_3A=29 # Remap Caps to LCtrl
evdev:input:b0003*
 KEYBOARD_KEY_70039=leftctrl
EOF
systemd-hwdb update
udevadm trigger
    
    
     Derate your ThinkPad battery to extend its lifespan
    
sudo tee /sys/class/power_supply/BAT0/charge_stop_threshold <<< 85
    
sudo tee /sys/class/power_supply/BAT0/charge_start_threshold <<< 80
    
     Optimus systems end up with both intel_backlight and nv_backlight.
    
set acpi_backlight=video to let xfpm-power-backlight-helper use the
    acpi_video0 interface instead, which also has a better curve.
    
     ZSwap seems to be all-upside.
    
Compress pages before swapping, and leave them cached.
    
echo Y > /sys/module/zswap/parameters/enabled
    
echo zsmalloc > /sys/module/zswap/parameters/zpool
    
echo lz4 > /sys/module/zswap/parameters/compressor
    
     Handy one liners
    
grep -oP 'prefix \K\w+' filename # just print the stuff after the prefix.  Handier than sed.
    
     Install Syncthing
    
mkdir -p ~/.config/systemd/user
cp ~/apps/syncthing-linux-amd64-rolling/etc/linux-systemd/user/syncthing.service ~/.config/systemd/user/
sed -i 's,/usr/bin/syncthing,/home/user/apps/syncthing-linux-amd64-rolling/syncthing,' ~/.config/systemd/user/syncthing.service
systemctl --user daemon-reload
systemctl --user enable syncthing.service
systemctl --user start syncthing.service
cat <<EOF >~/.stignore
/.cache
/.config/syncthing
/sshfs
/.local/share/containers/storage
/.local/state/syncthing
/.gvfs
EOF
    
    
     Repairing the Roland JP-8000
    Capacitor C219 on the main system board is a common failure point,
    probably because they used a 16V capacitor in a circuit which sees 15V.
    It's part of the muting circuit to prevent power-on thumps.  When it fails
    the output ends up quiet and very distorted.
    The fix is to desolder it and replace it with a new one. I upgraded to
    a larger 25V radial-leaded capacitor.  Hopefully this will be less likely
    to fail again in the future, and if it does, the radial leads are a lot
    easier to desolder than the original surface mounted part.
    Some people recommend re-capping the whole board, since all the
    capacitors are old at this point.  I went with "if it ain't broke, don't
    fix it".  I bought a full set in case it was necessary, but just replacing
    C219 (and C217, for clearance reasons) fixed it for me, and the synth
    sounds fantastic again.
    Exact replacement part numbers:
    
C219: EEEFC1C220R (22uF, 16V)
    
C217: EEEFC0J101AP (100uF, 6.3V)
    
19 others: EEEFC1C100R (10uF, 16V)
    The upgraded replacements I used:
    
C219: EEAFC1E220B (22uF, 25V)
    
C217: EEUFC1A101SB (100uF, 10V)
    --Kai