You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
functionkill_on_port() {
if [ $#-eq 0 ]
thenecho"Please provide a port number"returnfiif [ -z"$1" ]
thenecho"No port supplied"returnfikill -9 $(lsof -ti:$1)
}
Automatically use Node version from .nvmrc file on path change
export NVM_DIR="$HOME/.nvm"
[ -s"$NVM_DIR/nvm.sh" ] &&\."$NVM_DIR/nvm.sh"# This loads nvm
[ -s"$NVM_DIR/bash_completion" ] &&\."$NVM_DIR/bash_completion"# This loads nvm bash_completionuseNvmrcIfExist() {
if [[ -f".nvmrc" ]] {
nvm use
}
}
# Automatically call useNvmrcIfExist() when chaning directory
autoload -U add-zsh-hook
add-zsh-hook chpwd useNvmrcIfExist
useNvmrcIfExist # Call it once when opening terminal