Skip to content

Instantly share code, notes, and snippets.

@mping
Created April 5, 2018 12:55
Show Gist options
  • Select an option

  • Save mping/e15866ef0db5326bf9697167d6590ca2 to your computer and use it in GitHub Desktop.

Select an option

Save mping/e15866ef0db5326bf9697167d6590ca2 to your computer and use it in GitHub Desktop.
zsh
alias pserv='python -m SimpleHTTPServer $*'
alias wget='wget --trust-server-names --no-check-certificate'
alias ls='LC_COLLATE=C ls -lFha -G' #--group-directories-first --color '
alias grep='grep --color=always'
alias less='less -R'
# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
# Less colors
export LESS_TERMCAP_mb=$'\E[01;31m'
export LESS_TERMCAP_md=$'\E[01;38;5;74m'
export LESS_TERMCAP_me=$'\E[0m'
export LESS_TERMCAP_se=$'\E[0m'
export LESS_TERMCAP_so=$'\E[30;43m'
export LESS_TERMCAP_ue=$'\E[0m'
export LESS_TERMCAP_us=$'\E[04;38;5;146m'
export LC_COLLATE=C
### Git aliases
runGitAlias() {
git aliases
git config --global alias.lg "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative"
git config --global alias.st "status"
git config --global alias.pl "pull"
git config --global alias.p "push"
git config --global alias.c "commit -v"
git config --global alias.ca "commit -v -a"
git config --global alias.b "branch"
git config --global alias.co "checkout"
git config --global alias.cob "checkout -b"
git config --global alias.log "log"
git config --global alias.d "diff --color --ignore-space-at-eol -b -w --ignore-blank-lines"
git config --global alias.dd "diff --color-words --word-diff-regex='[A-z0-9_]+|[^[:space:]]' --ignore-blank-lines"
git config --global alias.dw "diff -w --word-diff=color --word-diff-regex=."
git config --global alias.stap "stash && git stash apply"
git config --global alias.sc "diff --name-only --diff-filter=U"
git config --global core.editor "subl -n -w"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment