Magic Spells

2 March 2021

Portage @world update

To upgrade a gentoo system.

emerge -aqvuDU --keep-going=y @world

Kernel upgrade

Upgrading the Linux kernel guide. After selecting the new sources, run:

genkernel all -j4

Rsync backup

To backup a filesystem with rsync.

rsync -aAXvP SRC DEST

ffmpeg quick compression/conversion

Raw recorded video is too big, and most compression snippets you find convert to patented formats with proprietary standards. I prefer:

ffmpeg -i input.mkv -codec:v libtheora -qscale:v 7 -codec:a libvorbis -qscale:a 5 output.ogv

Source, Similar.

White noise

Turn down your volume before trying these.

Interesting but not very pleasant:

pacat /dev/urandom &
# or
aplay /dev/urandom &

Nicer “pink” noise but not as interesting:

speaker-test -l 0

Generate one-time passcodes using a TOTP code

Using pass as password manager, with oath-toolkit installed and TOTP code stored as ~/.password-store/2fa/$service.

oathtool --totp --base32 $(pass 2fa/$service)