Skip to content

Instantly share code, notes, and snippets.

@ErikMuir
Created January 23, 2020 23:48
Show Gist options
  • Save ErikMuir/cf62b1204da2ff525dbce500a1699940 to your computer and use it in GitHub Desktop.
Save ErikMuir/cf62b1204da2ff525dbce500a1699940 to your computer and use it in GitHub Desktop.
# ----------------------
# Colors
# ----------------------
# Normal Colors
Black='\e[0;30m' # Black
Red='\e[0;31m' # Red
Green='\e[0;32m' # Green
Yellow='\e[0;33m' # Yellow
Blue='\e[0;34m' # Blue
Purple='\e[0;35m' # Purple
Cyan='\e[0;36m' # Cyan
White='\e[0;37m' # White
# Bold
BBlack='\e[1;30m' # Black
BRed='\e[1;31m' # Red
BGreen='\e[1;32m' # Green
BYellow='\e[1;33m' # Yellow
BBlue='\e[1;34m' # Blue
BPurple='\e[1;35m' # Purple
BCyan='\e[1;36m' # Cyan
BWhite='\e[1;37m' # White
# Background
On_Black='\e[40m' # Black
On_Red='\e[41m' # Red
On_Green='\e[42m' # Green
On_Yellow='\e[43m' # Yellow
On_Blue='\e[44m' # Blue
On_Purple='\e[45m' # Purple
On_Cyan='\e[46m' # Cyan
On_White='\e[47m' # White
NC="\e[m" # Color Reset
ALERT=${BWhite}${On_Red} # Bold White on red background
# ----------------------
# Git Aliases
# ----------------------
alias g='git'
alias ga='git add'
alias gaa='git add .'
alias gaaa='git add --all'
alias gau='git add --update'
alias gb='git branch'
alias gbd='git branch --delete '
alias gc='git commit'
alias gcm='git commit --message'
alias gcf='git commit --fixup'
alias gco='git checkout'
alias gcob='git checkout -b'
alias gcom='git checkout master'
alias gd='git diff'
alias gda='git diff HEAD'
alias gi='git init'
alias glg='git log --graph --oneline --decorate --all'
alias gld='git log --pretty=format:"%h %ad %s" --date=short --all'
alias gm='git merge --no-ff'
alias gma='git merge --abort'
alias gmc='git merge --continue'
alias gp='git push origin'
alias gpr='git pull --rebase'
alias gup='git pull --rebase'
alias gr='git rebase'
alias gs='git status'
alias gss='git status --short'
alias gst='git status'
# ----------------------
# Other Aliases
# ----------------------
alias ll='ls -la'
alias lcd=changeDirectory
# ----------------------
# Functions
# ----------------------
function weather() {
curl -s "wttr.in/$1?u1n"
}
function up() {
times=${1:-1}
while [ $times -gt 0 ]; do
cd ..
times=$(( $times - 1 ))
done
}
function changeDirectory() {
cd $1 ; ls -la
}
function trump() {
curl -s https://api.whatdoestrumpthink.com/api/v1/quotes/random | jq '.message'
}
# ----------------------
# OnLoad
# ----------------------
echo -e "${Cyan}${date}${NC}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment