Skip to content

Instantly share code, notes, and snippets.

sudo usermod --shell $(which zsh) USER_NAME
docker rmi $(docker images -f dangling=true -q)
zip -e [archive] [file]
# zip will not encrypt filenames so they will be visible.
zip -er [archive] [folder]
# rar command to encrypt everything including filenames
rar a -hp[password] data.rar data
du -h | sort -h
git fetch -p && for branch in `git branch -vv | grep ': gone]' | awk '{print $1}'`; do git branch -D $branch; done
git log --all --grep="search text"
@davoam
davoam / Git: git-remoteBranchesSortedByLastCommit.sh
Last active May 25, 2017 07:04
Shows sorted by commit date list of commits in remote repo
git remote prune origin && for branch in `git branch -r | grep -v HEAD`;do echo -e `git show --format="%ci %cr %an" $branch | head -n 1` \\t$branch; done | sort -r