Some Useful Commands
Normalize package dependencies (aptitude)
aptitude markauto '~i !~M (~R~i | ~P~R~i)'
Remove recommended packages
aptitude purge --purge-unused '!~E ~M !(~R~i | ~P~R~i)'
Remove sequentially duplicated frames
ffmpeg -i INPUT_FILE -vf mpdecimate,setpts=N/FRAME_RATE/TB OUTPUT_FILE
Normalize package dependencies (pacman)
comm -23 <(pacman -Qeq | sort) <(pacman -Qeqtt | sort) | xargs -r pacman -D --asdeps
comm -23 (pacman -Qeq | sort | psub) (pacman -Qeqtt | sort | psub) | xargs -r pacman -D --asdeps
Find packages containing wallpapers
pacman -Fl | grep -oP '^\S+ (?=usr/share/(wallpapers|backgrounds)/)' | sort -u
Generate self-signed certificate
openssl req \
-out cert.pem \
-newkey rsa:4096 \
-keyout key.pem \
-nodes \
-subj /CN=localhost \
-x509 \
-days 36500 \
-addext 'subjectAltName = DNS:localhost'
openssl pkcs12 \
-export \
-out cert.pfx \
-in cert.pem \
-inkey key.pem
Import external fonts
texmacs -x '(set-preference "imported fonts" "/usr/share/fonts/adobe-source-code-pro:/usr/share/fonts/adobe-source-han-sans:/usr/share/fonts/adobe-source-han-serif:/usr/share/fonts/adobe-source-sans-pro:/usr/share/fonts/adobe-source-serif-pro")
(font-database-build-local)
(quit-TeXmacs)'
Others
Bring swap memories back online
swapoff -a && swapon -a
Mirror a directory index website
wget -m -np -R 'index.html*'