Skip to content

Instantly share code, notes, and snippets.

@justforuse
Last active December 5, 2023 09:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save justforuse/37ef4176643be38228b7dba48065f542 to your computer and use it in GitHub Desktop.
Save justforuse/37ef4176643be38228b7dba48065f542 to your computer and use it in GitHub Desktop.
Alias for oh my zsh
alias ni="npm install"
alias ns="npm run serve"
alias nd="npm run dev"
alias nt="npm run test"
alias nb="npm run build"
alias rnm="rm -rf ./node_modules"
alias nvp="npm version patch"
alias nvm="npm version minor"
alias nvma="npm version major"
alias pi="pnpm i"
alias n16="nvm use 16"
alias n18="nvm use 18"
alias n20="nvm use 20"
alias ad="git add ."
alias ci="git commit -m"
alias ps="git push origin"
alias gp="git ps origin"
alias gpt="git ps origin && git ps origin --tags"
alias gl="git pull"
alias co="git checkout"
alias cob="git checkout -b"
# make a dir and into it
function mc() {
mkdir -p $1 && cd "$_"
}
# open with vscode
function c() {
if [ -z $1 ]; then
code .
else
code $1
fi
}
# kill port
function k() {
if [[ -z "$1" ]]; then
echo "Please provide a port number."
return 1
fi
local port="$1"
lsof -i ":$port" | awk 'NR!=1 {print $2}' | xargs kill
}
@justforuse
Copy link
Author

pl is alias for /usr/bin/pl, so change to gl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment