Last active
May 11, 2020 16:09
-
-
Save kreig303/e916c1eadf8c8737644e1e92a6b66888 to your computer and use it in GitHub Desktop.
.*sh_aliases
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## | |
# FINDER SPECIFIC | |
## | |
alias show-files='defaults write com.apple.finder AppleShowAllFiles YES; | |
killall Finder /System/Library/CoreServices/Finder.app' # show hidden files in Finder | |
alias hide-files='defaults write com.apple.finder AppleShowAllFiles NO; | |
killall Finder /System/Library/CoreServices/Finder.app' # hide hidden files in Finder | |
## | |
# SHELL SPECIFIC | |
## | |
if type brew &>/dev/null; then | |
FPATH=$(brew --prefix)/share/zsh/site-functions:$FPATH | |
fi | |
alias findip="ifconfig | grep -w inet" # to find the client's IPs | |
alias envvars="env | grep $USER" # list all user shell variables | |
alias clr="clear" # slight contraction of clear command | |
alias edrc="vim ~/.zshrc" # for editing this file | |
alias vurc="cat ~/.zshrc" # for viewing this file | |
alias edpro="vim ~/.zprofile" # for editing this file | |
alias vupro="cat ~/.zprofile" # for viewing this file | |
alias relo=". ~/.zshrc" # reload .zrc | |
alias relop=". ~/.zprofile" # reload .zprofile | |
alias ls="ls -G" | |
alias la="ls -Ghal" | |
alias ll="ls -Ghl" # list long | |
alias up="cd .." # better back | |
alias keyco="pbcopy < ~/.ssh/id_rsa.pub" # For when you need to include your key in various sites | |
#export CLICOLOR=1 # turn on shell colors | |
#export LSCOLORS=DxFxCxDxBxegedabagaced # set shell colors | |
## | |
# GIT SPECIFIC | |
## | |
alias gpull="git pull" | |
alias gpush="git push" | |
alias gfetch="git fetch --all" | |
alias gfull="git fetch --all && git pull" | |
alias gbase="git rebase" | |
alias gtag="git tag" | |
alias gs="git status" # regular view | |
alias gss="git status -sb" # simple view | |
alias gb="git branch" | |
alias gclean="git clean -fxe .env" | |
alias gch="git checkout" | |
alias gadd="git add" # add selection | |
alias gadda="git add ." # add all files including untracked | |
alias gaddu="git add -u" # add only those currently tracked | |
alias gaddp="git add -p" # patch add | |
alias gloch="git diff master..HEAD -- . ':(exclude)./package-lock.json'" | |
alias gco="git commit" | |
alias gres="git reset" | |
alias gd="git diff" | |
alias gdl="git diff -- . ':(exclude)./package-lock.json'" | |
alias gds="git diff --stat" | |
alias gl="git log" | |
alias glot="git log --pretty=format:'%h - %ar: %s'" # fancy | |
alias glo="git log --oneline --decorate" # shortened | |
alias gloq="git log --graph" | |
alias gloqo="git log --graph --oneline" | |
alias gstash="git stash save" | |
alias gpop="git stash pop" | |
alias gbra="git branch" | |
alias gbrav="git branch -vv" # very verbose | |
alias grev="git remote -v" # list remotes | |
alias gconfl="git config --global -l" # list global config | |
alias guprepu="git fetch upstream master &>/dev/null && git rebase upstream/master &>/dev/null && git push" # for rebasing forks to match upstream repos | |
alias gupstream="git remote set-url upstream NO_PUSH --push && git fetch upstream && git rebase upstream/master && git push && git push --tags" | |
alias gcl="git clone" | |
## | |
# NPM | |
# SPECIFIC | |
## | |
alias nunpm="sudo npm i npm@latest -g" # to install the latest and greatest npm | |
alias npmclr="rm -rf node_modules/ package-lock.json" # to clean up a node app for reinstallation | |
alias npmlg="npm ls -g --depth=0" # list all globally installed packages | |
alias npmll="npm ls --depth=0 > deps.txt" # output local deps to file | |
## | |
# nvm specific | |
## | |
alias inode="nvm install node --reinstall-packages-from=node" | |
# alias nvmcarb="nvm install lts/carbon" | |
#alias idub="nvm install lts/dubnium" | |
alias ierb="nvm install lts/erbium" | |
alias nvmre="nvm reinstall-packages node" | |
#alias reerb="nvm use lts/erbium && nvm reinstall-packages node && nvm use node" | |
alias redub="nvm use lts/dubnium && nvm reinstall-packages node && nvm use node" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment