Skip to content

Instantly share code, notes, and snippets.

@yankcrime
Created June 12, 2014 10:52
Show Gist options
  • Save yankcrime/dbeca419bf58f679fa8b to your computer and use it in GitHub Desktop.
Save yankcrime/dbeca419bf58f679fa8b to your computer and use it in GitHub Desktop.
# nick's .bashrc
# [email protected]
# basics
set -o vi
set show-all-if-ambiguous on
shopt -s checkwinsize
PATH=/usr/local/bin:$PATH:~/bin:~/.rvm/bin:/Applications/VMware\ Fusion.app/Contents/Library:/usr/local/sbin:/usr/texbin/
PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting
export PATH
# source some useful stuff
source ~/bin/prompt.sh
source ~/bin/z.sh
# some {sensible,useful} shortcuts
alias pg='ps auwwx | grep -i -e ^USER -e '
alias publicip='curl http://ifconfig.me'
alias webserver="ifconfig | grep 'inet ' | grep -v 127.0.0.1; python -m SimpleHTTPServer"
alias cls='clear'
alias ls='ls -FG'
alias tma='tmux attach-session -t'
alias view='vim -R'
alias trillian='mosh trillian.dischord.org'
alias sshvpn='sshuttle --dns -N -v -r [email protected]:53 0/0'
alias mq='msmtp-queue'
alias sshx='ssh -c arcfour,blowfish-cbc -XC'
alias pwplz='apg -n 1 -m 12 -x 12 -M NC'
alias vim='mvim -v'
# <3 vagrant
alias vup='vagrant up --provider=vmware_fusion'
alias vprov='vagrant provision'
alias vstat='vagrant status'
alias vhalt='vagrant halt'
alias vnuke='vagrant destroy -f'
alias vssh='vagrant ssh'
alias vhosts='vagrant hostmanager --provider=vmware_fusion'
# git stuff
alias gitl='git log --pretty=format:"%h - %an, %ar : %s"'
alias gits='git shortlog --numbered --summary'
alias gitrs="git reset --soft 'HEAD^'"
alias gitrsh='git reset --hard HEAD'
# hacks
function getip () {
dig +short @10.10.192.250 $1
}
# Set hostname in hardstatus line in tmux
if [ "$TERM" == "screen-256color" ]; then
function ssh() {
echo -n -e "\033k$1\033\\"
/usr/bin/ssh $@
echo -n -e "\033k`hostname -s`\033\\"
}
function mosh() {
echo -n -e "\033k$1\033\\"
/usr/local/bin/mosh $@
echo -n -e "\033k`hostname -s`\033\\"
}
# We're on localhost
echo -e "\033k`hostname -s`\033\\"
fi
# rvm junk
[[ -s "/Users/nick/.rvm/scripts/rvm" ]] && source "/Users/nick/.rvm/scripts/rvm"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment