Binaries and scripts

Meta

xkill

Lets you click a x11 window to kill the underlying process!

date

print or set the system date and time

ffmpeg

Create animated gif from screen area


ffmpeg -framerate 25 -f x11grab (slop -f '-video_size %wx%h -i :0.0+%x,%y' | string split ' ') ~/Videos/capture_(date -Iminutes).mkv

Scripts

Find and replace using sed across all occurrances in a folder


find . -type f -exec sed -i.txt "s/foo/bar/g" {} \;

Rename file extension


!#/bin/bash
for f in *.JPG;
  do mv -- "$f" "${f%.JPG}.jpg";
done

Get paste-able filename list (used for {log} entries)


ls -1 2021-08-*

Migrating from .mmx to .mx

Images


find . -type f -name "*.md" -exec gsed --regexp-extended -i.bak "s/\!!![](](([^]((\S*)()]*))?\)/!![)(\3)(\1)/g" {} \;

Links


find . -type f -name "*.md" -exec gsed --regexp-extended -i.bak "s/\{(\S*), (!!![](]()(^\})*)\}/[\2)(\1)/g" {} \;

Compiled 2024-04-21