Last active
February 17, 2026 17:33
-
-
Save ghostrydr/13d06b4e8e1a83b157ded90f2c5f2355 to your computer and use it in GitHub Desktop.
Some terminal helper functions/aliases make make life easier
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function killport() { | |
| if [ -z $1 ]; then | |
| echo "Usage: killport <port>" | |
| return | |
| fi | |
| lsof -t -i tcp:$1 | xargs kill -9 | |
| } | |
| function whatport() { | |
| if [ -z $1 ]; then | |
| echo "Usage: whatport <port>" | |
| return | |
| fi | |
| lsof -i tcp:$1 | grep 'LISTEN' | awk '{print $2}' | xargs ps -fp | awk '{ print $9 }' | |
| } | |
| # Git | |
| alias status='git status' | |
| alias fetch='git fetch' | |
| alias pull='git pull' | |
| alias push='git push' | |
| alias stash='git stash' | |
| alias pop='git stash pop' | |
| alias abort='git reset --merge' | |
| alias mm='git merge master' | |
| alias checkout='git checkout $@' | |
| alias branch='git checkout -b $@' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment