Skip to content

Instantly share code, notes, and snippets.

@tlinkner
Last active March 22, 2017 03:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tlinkner/2ac3bde2f16dc0f190e84eec83a155bd to your computer and use it in GitHub Desktop.
Save tlinkner/2ac3bde2f16dc0f190e84eec83a155bd to your computer and use it in GitHub Desktop.
# Rename files
### brew install rename
### Dry run
rename -nvs searchword replaceword *
### Rename
rename -vs searchword replaceword *
### Node renamer
### npm install -g renamer
renamer --find '.markdown' --replace '.md' '**'
### Prefix
rename -vA appendword *
### Mirror a website
wget -m http://www.example.com/
### Launch a simple local server
python -m SimpleHTTPServer
### brew install youtube-dl
youtube-dl -f bestaudio https://url
### Convert audio
### brew install ffmpeg
ffmpeg -i filename.webm filename.wav
# batch rename (http://plasmasturm.org/code/rename/)
### brew install rename
### add '.png' to end
rename -a '.png' *
### delete 'OM '
rename -d 'OM ' *
### replace/substitute string
rename -s '.png' '-berry.png' *.png
# Compare directories recursively
diff -rq folder1 folder2
# View processes and ports
sudo lsof -i -n -P | grep TCP
sudo kill -9 4428
# Automated Link Checker
npm install -g broken-link-checker
blc http://localhost:8000 -ero > ~/Desktop/broken-links.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment