Skip to content

Instantly share code, notes, and snippets.

@mathesond2
Created May 21, 2018 02:52
Show Gist options
  • Save mathesond2/7ec30c3daaa17c443afe5f452e3b19ae to your computer and use it in GitHub Desktop.
Save mathesond2/7ec30c3daaa17c443afe5f452e3b19ae to your computer and use it in GitHub Desktop.

To run the default version of any command, use a backslash (). For example, \rm

would bypass my alias of 'rm -i' on line 31.

OS-Level

alias show-hidden-files='defaults write com.apple.finder AppleShowAllFiles TRUE' alias hide-hidden-files='defaults write com.apple.finder AppleShowAllFiles FALSE'

Sublime Text

alias subl='/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl' alias st='/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl'

Environment

alias cp='cp -i' alias desktop='cd ~/Desktop' alias home='cd' alias mv='mv -i' alias rm='rm -i' alias grep='grep --color' alias l='ls -l -G' alias lla='ls -d .*' alias ll='ls -l -G' alias ls='ls -G' alias sizeof='du -hs'

Programming Languages

alias sass='sass --unix-newlines --style expanded --watch' alias scss='scss --unix-newlines --style expanded --watch'

JetBrains

alias webstorm='/Applications/WebStorm.app/Contents/MacOS/webstorm'

change directories (5/18)

alias .='cd ..' alias ..='cd ../..' alias ...='cd ../../..' alias ....='cd ../../../..' alias .....='cd ../../../../..' alias desk="cd /Users/davidmatheson/desktop"

set up a quick python server instance

alias server='python -m SimpleHTTPServer'

create boilerplate projects

template() { git clone git@github.com:mathesond2/project-template.git && mv 'project-template' "$@" && cd $_ && rm -rf .git } templateskeleton() { git clone git@github.com:mathesond2/project-template-skeleton.git && mv 'project-template-skeleton' "$@" && cd $_ && rm -rf .git } templatesimple() { git clone git@github.com:mathesond2/simple-template.git && mv 'simple-template' "$@" && cd $_ && rm -rf .git }

alias template=template alias templateskeleton=templateskeleton alias templatesimple=templatesimple

Git aliases

alias gst='git status' alias grv='git remote -v' alias gpu='git push upstream' alias gm='git merge' alias gp='git push' alias gf='git fetch' alias gcm='git checkout master' alias gcmsg='git commit -m' alias gd='git diff' alias gdca='git diff --cached' alias grh='git reset HEAD' alias grhh='git reset HEAD --hard' alias gco='git checkout' alias gcb='git checkout -b' alias ga='git add' alias gaa='git add --all' alias gb='git branch'

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