Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
167 lines (133 sloc) 3.97 KB
#########
# $PATH
# sudo chown -R (whoami) (npm config get prefix)/{lib/node_modules,bin,share}
#########
set -xg PATH (yarn global bin) $PATH
# set PATH /usr/local/Cellar/node/7.4.0/bin/ $PATH
# set -xg PATH /usr/local/bin $PATH
# set -xg PATH '/usr/local/opt/fzf/bin' $PATH
# set -xg PATH (npm config get prefix)/bin $PATH
# set PATH ~/npm/bin $PATH
# set PATH /usr/local/share/npm/bin $PATH
# set -xg PATH /usr/local/bin $PATH
set -xg PATH /usr/local/lib $PATH
# set PATH /opt/local/bin $PATH
# set PATH /opt/local/sbin $PATH
# set PATH /usr/local/share/npm/bin $PATH
# set -xg PATH ~/.npm $PATH
# set -xg NODE_PATH lib $NODE_PATH
# set -xg NODE_PATH /usr/local/lib/node_modules $NODE_PATH
test -e {$HOME}/.config/.iterm2_shell_integration.fish ; and source {$HOME}/.config/.iterm2_shell_integration.fish
#########
# Aliases
#########
alias .. 'cd ..'
alias cd.. 'cd ..'
alias ... 'cd ../..'
alias .... 'cd ../../..'
alias ..... 'cd ../../../..'
alias lsd 'ls -l | grep "^d"' # only directories
alias hosts 'sudo nano /private/etc/hosts'
alias git 'hub'
# GIT STUFF
alias ga 'git add'
alias ga. 'git add .'
alias gaa 'git add --all'
alias gb 'git branch'
alias gcm 'git commit'
alias gcma 'git commit --all'
alias gco 'git checkout'
alias gc 'git checkout'
alias gpl 'git pull'
alias gpu 'git push'
alias gpuf 'git push -f'
alias gm 'git merge'
alias gr 'git reset'
alias gs 'git status'
alias gst 'git stash'
alias gstp 'git stash pop'
alias gsta 'git stash apply'
alias ga 'git add -A'
alias gap 'git add -p'
alias guns 'git unstage'
alias gunc 'git uncommit'
alias gm 'git merge'
alias gms 'git merge --squash'
alias gam 'git amend --reset-author'
alias grv 'git remote -v'
alias grr 'git remote rm'
alias grad 'git remote add'
# Log
alias gl 'git log'
alias glog 'git log --graph --pretty --abbrev-commit --date=relative --branches'
# Rebasing
alias gr 'git rebase'
alias grdev 'git rebase develop'
alias gra 'git rebase --abort'
alias grc 'git rebase --continue'
alias gri 'git rebase --interactive'
# Fetch
alias gf 'git fetch'
alias gfp 'git fetch --prune'
alias gfa 'git fetch --all'
alias gfap 'git fetch --all --prune'
alias gfch 'git fetch'
alias gd 'git diff'
# Undoing
alias undopush 'git push -f origin HEAD^:master' # Undo a `git push`
alias undocommit 'git reset HEAD~1'
alias undocommitforce 'git reset --hard HEAD~1'
alias standup 'git-standup'
# PRs
alias prs 'hub pr list -L 20 -b develop --format="%t%n - Branch: [%H]%n - %U%n - %l%n%n"'
alias prc 'hub pr checkout '
# Nuke the node_modules folder
alias nuke 'rm -rf node_modules'
# Update Ruby gems, Homebrew, npm & their installed packages
alias brew_update 'brew -v update; brew upgrade --force-bottle --cleanup; brew cleanup; brew cask cleanup; brew prune; brew doctor'
alias updateall 'brew_update; npm install npm -g; npm update -g; sudo gem update --system; sudo gem update --no-document'
alias updatenpmglobal 'npm-check -g -u'
alias updatenpm 'npm-check -u'
alias updateyarn 'yarn upgrade-interactive --latest'
alias updateyarnglobal 'yarn global upgrade-interactive --latest'
# Yarn
alias ya 'yarn add'
alias yad 'yarn add -D'
alias yap 'yarn add -P'
alias ys 'yarn start'
alias yd 'yarn dev'
alias yt 'yarn test'
alias ytw 'yarn test --watch'
alias yt:w 'yarn test:watch'
alias ytjs 'yarn test:js'
alias ysb 'yarn storybook'
alias yl 'yarn lint'
alias yb 'yarn build'
alias myip 'curl icanhazip.com'
alias reload 'exec {$SHELL} -l'
#########
# Functions
#########
# Create a new directory and enter it
function md
mkdir -p $argv ; cd $argv
end
# Get weather
function weather
curl wttr.in/{$argv}
end
# deploy personal site
function deploy
now alias {$argv} zander.wtf
end
if not functions -q fundle; eval (curl -sfL https://git.io/fundle-install); end
fundle plugin 'edc/bass'
function nvm
bass source ~/.nvm/nvm.sh --no-use ';' nvm $argv
end
# bass source ~/.nvm/nvm.sh --no-use ';' nvm
# nvm use default --silent
# Install last stable node.js
# ⋊> ~ nvm install stable
# Set stable version to default
# ⋊> ~ nvm alias default stable