Skip to content

Instantly share code, notes, and snippets.

@genuinelucifer
Created September 18, 2019 08:36
Show Gist options
  • Save genuinelucifer/fb67920e872e47f3f9d58b91418a870e to your computer and use it in GitHub Desktop.
Save genuinelucifer/fb67920e872e47f3f9d58b91418a870e to your computer and use it in GitHub Desktop.
Commonly used alias functions. Save it in home directory.
alias ownhome='sudo chown -R ${USER}: ~'
alias glon='git log --oneline -n'
# Checkout branch from origin also track it in new branch for easier push/pull later
alias gct='git fetch origin && git checkout --track'
alias ftext='grep -rnwl --exclude-dir=node_modules'
alias dir_size='du -h --max-depth=1 ./ | sort -h'
alias untargz='tar -xvzf'
alias targz='tar -zcvf'
alias gdob='git branch | egrep -v "(^\*|master|develop)" | xargs git branch -D'
# Replace <acc_num> and <email> in command. Pass mfa token as parameter
alias create_mfa_profile='aws sts get-session-token --serial-number arn:aws:iam::<acc_num>:mfa/<email> --duration-seconds 86400 --token-code '
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment