rmariuzzo / knowledge

List of stuff I have learnt ...

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Knowledge

List of stuff I have learnt...

CLI

Capture screenshots automatically OSX

i=1; while true; do screencapture -C -m -t jpg -x ~/captures/$i.jpg; let i++; sleep 1; done

Grep same file in multiple directory *nix OSX

find . -maxdepth 2 -name package.json -exec grep --color -niH 'node ' {} \;

Execute specific chef-solo recipes *nix OSX

sudo chef-solo --config-option cookbook_path=`pwd` -o apache2::default,apache2::vhosts

Delete all local Git branches except master

git branch | grep -v "master" | xargs git branch -D 

Find untouched node_modules in the last 90 days

find . -type d -ctime +90 -name node_modules -depth 2 -exec du -hs {} \;

Delete empty directories

find . -empty -type d -delete

About

List of stuff I have learnt ...

License:MIT License