Skip to content

Instantly share code, notes, and snippets.

@LukasBombach
Last active January 5, 2024 09:06
Show Gist options
  • Select an option

  • Save LukasBombach/00662c40faaaa0d2cc46ed5f759549a9 to your computer and use it in GitHub Desktop.

Select an option

Save LukasBombach/00662c40faaaa0d2cc46ed5f759549a9 to your computer and use it in GitHub Desktop.
# My oh my zsh aliases and functions
# Configure oh my zsh
alias zshrc="code ~/.zshrc"
# Kill a process at port x
function killport() {
lsof -i TCP:$1 | grep LISTEN | awk '{print $2}' | xargs kill -9
echo "Port" $1 "found and killed."
}
# Clone a repo into ~/Projects and open code
function np() {
git clone "$1" "$HOME/Projects/$(basename "$1" .git)" && code "$HOME/Projects/$(basename "$1" .git)"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment