Skip to content

Instantly share code, notes, and snippets.

~/.zshrc or ~/.bash_profile
listening() {
if [ $# -eq 0 ]; then
sudo lsof -iTCP -sTCP:LISTEN -n -P
elif [ $# -eq 1 ]; then
sudo lsof -iTCP -sTCP:LISTEN -n -P | grep -i --color $1
else
echo "Usage: listening [pattern]"
fi
git config --global alias.mr 'git push origin HEAD'
git config --global alias.undo 'git reset --soft HEAD~1'