Terminal commands/pipes/mini-scripts I always have to search for :/
Need to do this before starting Local WP on some machines.
sudo apachectl stop
ffmpeg -activation_bytes 036b933a -i INPUT OUTPUT.mp3
batch:
for i in *.aax; do ffmpeg -activation_bytes 036b933a -i "$i" "${i%.*}.mp3"; done
When Ubuntu surprises me with E: Unable to correct problems, you have held broken packages
, doing whatever you were trying to do with aptitude
is usually the solution.
jpegoptim -v --size=240k file_name.jpg
requires imagemagick
convert input.png -trim +repage output.png
sudo dhclient -r && sudo dhclient
gh repo list koljapluemer --limit 1000 | awk '{print $1; }' | xargs -L1 gh repo clone
Assumes gh
is installed.
- TODO: allow to exclude repos starting with
_
, or archived repos (which should be the same)
git remote | xargs -L1 git push --all
heroku git:remote -a example-app
https://devcenter.heroku.com/articles/git#for-an-existing-app
killall -s SIGKILL firefox
pdfunite file_start_or_whatever* out.pdf
now that ngrok is paid and commercial and annoying:
npx localtunnel --port 8000
(it's an npm package)
(maybe learn to handle poetry
instead)
On encountering some ancient Python project with a requirements.txt
containing old, hard-coded versions of libraries, do the following:
- copy-paste the
requirements.txt
- if needed:
pip install pip-tools
pip-compile -U requirements.txt
the web meme convertor
for i in *.webp; do name=`echo "$i" | cut -d'.' -f1`; echo "$name"; convert "$i" "${name}.jpg"; done
getting podcasts on my mp3 player like:
yt-dlp -f 'bestaudio[ext=m4a]' "http://youtu.be/XXXXXXXXX"