Travel log
Bucket list

Code snippets

Stop all docker containers
docker stop $(docker ps -a -q)
List folders with their size
Run on home folder with -d 1 for depth
du -h -d 1
MacOS Install all software updates
Lists and install all pending software updates on MacOS using terminal.
softwareupdate -i -a
Git un commit last commit
Stages last commit files.
git reset --soft HEAD^
SSH download from linux remote to local
The -avzp flags are to be progressive, zipped, recursive.
rsync -avzp destination local // example downloading file called .salam rsync -avzP root@host:/home/ec2-user/.salam ./Desktop
Cleanup local git branches
Delete all git branches in local machine except "main" and "staging". More branches can be excluded with the regex pattern
git branch | egrep -v "(^\*|main|staging)" | xargs git branch -D