Skip to content

Instantly share code, notes, and snippets.

@papidb
Last active May 28, 2020 18:46
Show Gist options
  • Save papidb/fa69ddba3d7bbab65c233c8c00139bce to your computer and use it in GitHub Desktop.
Save papidb/fa69ddba3d7bbab65c233c8c00139bce to your computer and use it in GitHub Desktop.
Helpful shell aliases
# aliases are basically nicknames
# they are used to represent commands or function with a string
alias babe="yarn"
# usage:
# babe --version
# babe add node-sass
# Print my public IP
alias myip="curl ipinfo.io/ip"
# myip
# check weather condition
alias rain='curl -4 http://wttr.in'
# functions are also a fancy way of running
# commands with arguments
rainn() {
curl -4 "http://wttr.in/$1"
}
# push git code
alias push="git push"
# list files and directory
alias ll="ls -la"
# Go up a directory
alias ..="cd .."
# Go up two directories
alias ...="cd .. && cd .."
@papidb
Copy link
Author

papidb commented Apr 23, 2020

You can copy this and paste in your bash configuration file like (.bashrc or .zshrc).
Please drop your aliases. Thanks.

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