Skip to content

Instantly share code, notes, and snippets.

@sebastianczech
Last active September 9, 2020 06:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sebastianczech/41afe7c3bd387e84af51896d4091567c to your computer and use it in GitHub Desktop.
Save sebastianczech/41afe7c3bd387e84af51896d4091567c to your computer and use it in GitHub Desktop.
Useful linux commands

Wrong indentation when editing YAML in vi/vim

vi .vimrc:

autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab

Convert MKV to MP4 with AAC audio codec

for f in *.mkv; do ffmpeg -i "$f" -vcodec copy -acodec aac  "${f%.mkv}.mp4"; done  

Archlinux

Upgrade all packages

pacman -Syu
pacman -Syu --noconfirm 
pacman -Syu --overwrite /usr/lib\*/p11-kit-trust.so
pacman -Syu --noconfirm --overwrite '*'

Pip

Upgrade all outdate packages:

pip list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1  | xargs -n1 pip install -U
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment