Some useful commands

aptitude

Normalize package dependencies

aptitude markauto '~i !~M (~R~i | ~P~R~i)'
aptitude purge --purge-unused '!~E ~M !(~R~i | ~P~R~i)'

FFmpeg

Remove sequentially duplicate frames

ffmpeg -i INPUT_FILE -vf mpdecimate,setpts=N/FRAME_RATE/TB OUTPUT_FILE

pacman

Normalize package dependencies

# For Bash.

comm -23 <(pacman -Qeq | sort) <(pacman -Qeqtt | sort) | xargs -r pacman -D --asdeps
# For Fish.

comm -23 (pacman -Qeq | sort | psub) (pacman -Qeqtt | sort | psub) | xargs -r pacman -D --asdeps

OpenSSL

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'

Create PKCS #12 file

openssl pkcs12 \
    -export \
    -out cert.pfx \
    -in cert.pem \
    -inkey key.pem

Others

Bring swap memories back online

swapoff -a && swapon -a