Skip to content

Instantly share code, notes, and snippets.

@clathrop
Created December 11, 2018 18:27
Show Gist options
  • Save clathrop/df05c296008182e7b2390fc61f3d78a9 to your computer and use it in GitHub Desktop.
Save clathrop/df05c296008182e7b2390fc61f3d78a9 to your computer and use it in GitHub Desktop.
parse_git_branch() {
git branch 2>/dev/null | grep \* | sed -ne 's#\* ##p' | awk -F / '{print " [GIT:"$0 "]"}'
}
export PS1='\[\033[00;32m\]\w\[\033[00m\]$(parse_git_branch)\$ '
########### ALIASES ##############
#commands to change window size, big and small
alias smw="printf '\033[8;25;100t'"
alias lgw="printf '\033[8;50;150t'"
#quick edit bash profile
alias ebash="subl ~/.bash_profile"
alias vibash="vi ~/.bash_profile"
#ssh stuff
alias sshdev1="ssh clathrop@162.243.152.109"
#lookin at stuff
alias l="ls"
alias ll="ls -l"
alias la="ls -a"
alias lla="ls -la"
alias tf="tail -1000f"
#git
alias gs="git status"
alias gc="git commit -m"
alias gp="git pull"
alias gb="git branch --sort=-committerdate"
# paperstreet
# db login
export HEROKU_ORGANIZATION=paperstreet
#heroku
alias psdeploy-dev="git checkout develop;git pull;git push heroku-paperstreet-dev develop:master"
alias psdeploy-stage="git checkout stage;git pull;git push heroku-paperstreet-stage stage:master"
alias psdeploy-prod="git checkout master;git pull;git push heroku-paperstreet-prod master:master"
alias psrestart-dev="heroku restart --app paperstreet-dev"
alias psrestart-stage="heroku restart --app paperstreet-stage"
alias psrestart-prod="heroku restart --app paperstreet-prod"
#heroku postgres
alias psdblogin-dev="heroku pg:psql -a paperstreet-dev"
alias psdblogin-prod="heroku pg:psql -a paperstreet-prod"
##### POSTGRES #####
#To have launchd start postgresql now and restart at login:
#brew services start postgresql
#Or, if you don't want/need a background service you can just run:
#Run in current shell
alias pg_up="pg_ctl -D /usr/local/var/postgres start"
#run and log to server.log
alias pg_upl="pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start"
#run and log to server.log
alias pg_stop="pg_ctl -D /usr/local/var/postgres stop -s -m fast"
export CLICOLOR=1
export PATH=$PATH:/usr/local/Cellar/maven32/3.2.5/bin:/Users/clathrop/work/adobe-aem/author/crx-quickstart/bin:/usr/local/apache-jackrabbit/vault-cli-3.1.6/bin
export FLASK_APP="/Users/clathrop/dev/lathrop-io/lathrop_io.py"
export FLASK_DEBUG=1
"~/.bash_profile" 72L, 2295C
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment