Skip to content

Instantly share code, notes, and snippets.

@fayazara
Last active March 12, 2025 08:47
Show Gist options
  • Save fayazara/8e9a126ef9c0dcac22950d417db196b9 to your computer and use it in GitHub Desktop.
Save fayazara/8e9a126ef9c0dcac22950d417db196b9 to your computer and use it in GitHub Desktop.
My bash aliases - Not sure if these work on Linux/Windows
# Node.js project shortcuts (requires 'ni' package manager - https://github.com/antfu-collective/ni)
alias d="nr dev" # npm/pnpm/yarn run dev
alias s="nr start" # npm/pnpm/yarn run start
alias i="ni" # Install dependencies
alias u="nun" # Uninstall a a package
alias up="nlx taze" # Update dependencies to latest versions
# Open Cursor app
alias c="open $1 -a \"Cursor\""
# Git
alias g="git" # Git shorthand
alias ga="git add" # Stage changes
alias gc="git commit -m" # Commit with message
alias gs="git status" # Show status
alias gb="git branch" # List branches
alias gd="git diff" # Show changes
alias gco="git checkout" # Switch branches
alias gcb="git checkout -b" # Create & switch to new branch
alias gp="git pull" # Pull latest changes
alias gP="git push" # Push changes
# Print directory tree structure
alias tree="find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'"
# Start a cloudflare tunnel (e.g., tunnel http://localhost:3000)
alias tunnel="npx untun@latest tunnel"
# Copy current directory path to clipboard (Mac)
alias cpwd="pwd | pbcopy"
# Create a directory and navigate into it
alias mkd="mkdir -p $1 && cd $1"
# Copy file content to clipboard (Mac)
alias cb="pbcopy"
# Get weather information (requires wttr.in)
alias weather="curl wttr.in"
# Kill process running on a specific port
alias killport="kill -9 \$(lsof -t -i:\$1)"
# Open current directory in Finder (Mac)
alias o.="open ."
# Quick shortcut to home directory
alias home="cd ~"
# Show public IP address
alias myip="curl ifconfig.me"
@productdevbook
Copy link

productdevbook commented Mar 12, 2025

# (requires 'taze' package manager - https://github.com/antfu-collective/taze) 
alias taz0='taze -r -w && pnpm install'
alias taz1='taze major -r -w && pnpm install'

@fayazara
Copy link
Author

# (requires 'taze' package manager - https://github.com/antfu-collective/taze) 
alias taz0='taze -r -w && pnpm install'
alias taz1='taze major -r -w && pnpm install'

Much better - going in my terminal now

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