This page contains a collection of all the tips and tricks I use to get my work done faster. I use Debian as my distro as choice so all the commands here will be skewed in favor of it.
find ./ -type f -not -path '/.' -not -path "./exclude/*" -readable -writable -exec sed -i "s/bad/good/g" {} \;
This will exclude all folders starting with ‘./‘ which includes stuff like .git and also other folders like ‘./exclude/‘, change to your liking accordingly.
To convert all the png files in a directory to jpegs:
1
mogrify -format jpg *.png
Miscellaneous
Get your current IP address
1
curl icanhazip.com
Rename all the files of an extension in sequential order
1
ls | cat -n | whileread n f; domv"$f""$n.jpg"; done
Solving bluetooth woes on Debian 12
I was having a lot of trouble with my Sony WL-XB400 bluetooth headphones on Debian 12. I was able to pair them but only the handsfree option showed up which is not ideal as it’s not very good for listening to music. I tried a lot of things but nothing worked. Finally I found a solution that worked for me.
This made everything work almost instantly. I was able to pair my headphones and the A2DP option showed up. I was able to listen to music and watch videos without any issues.