Bash
Delete merged branches. (Stack Overflow)
git branch -D `git branch --merged | grep -v \* | xargs`
if you're having trouble linking a lib, run 'ld -llmpe --verbose', swapping out your lib name, and you'll see where ld is looking and not finding it.
ld -llmpe --verbose
If you take a photo on an iPhone, transfer the "photo" to your computer, end up with an AVI and want image files
ffmpeg -i IMG_1455.avi -r 1 -f image2 image-%3d.jpeg
If you are in the terminal while using an X Window system, and want to open a file or the current directory with the default application for it.
xdg-open .
xdg-open file
To search for identical files in the current directory and subdirectories
rdfind .
Get a quick year-month-day at the command line
$ echo $(date +%Y-%m-%d)
2020-05-22
If under Ubuntu 18.04 an NTFS partition is mounting read-only, run this command and re-mount to make it read/write
sudo ntfsfix /dev/sdb1
python -m json.tool my_json.json
OS X simple timer
sleep $((5*60)); Say "job complete"
Speed up a video 100x (link)
ffmpeg -i ppo-self-play-two-players.mov -filter:v "setpts=0.01*PTS" ppo-self-play-two-players-fast.mov
Simple web server on the command line
$ python -m http.server 8000
Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/) ...
Check DNS settings on Mac OS X
scutil --dns