Skip to content

Instantly share code, notes, and snippets.

View dw72's full-sized avatar

Dariusz Włodarczyk dw72

  • Krotoszyn
  • 05:10 (UTC +01:00)
View GitHub Profile
@dw72
dw72 / mirrorlist.hook
Last active May 17, 2025 15:37
Hook to update pacman mirrorlist using reflector after each upgrade of pacman-mirrorlist #arch #linux
[Trigger]
Operation = Upgrade
Type = Package
Target = pacman-mirrorlist
[Action]
Description = Updating pacman-mirrorlist with reflector and removing pacnew...
When = PostTransaction
Depends = reflector
Exec = /usr/bin/bash -c "reflector --country 'Poland' --latest 5 --sort rate --save /etc/pacman.d/mirrorlist && rm -f /etc/pacman.d/mirrorlist.pacnew || true"
@dw72
dw72 / convert2mp3
Last active April 3, 2017 18:18
convert all specified media files to mp3
for file in "$@"; do
ffmpeg -i "$file" -vn -ar 44100 -ac 2 -ab 192k -f mp3 "${file%.*}.mp3"
done