Created
April 15, 2014 19:48
-
-
Save zph/10765187 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| # TODO: | |
| # - write function to transform jam update to jam upgrade | |
| # Apps | |
| # Port num + 100 reserved for puma control | |
| export COMPANY_PREFIX='RP' | |
| export RP_AG_CONTROL_PORT=9392 | |
| export RP_CONFUSION_CONTROL_PORT=9410 | |
| export RP_PORTAL_CONTROL_PORT=9411 | |
| export RP_RNR_UI_CONTROL_PORT=9413 | |
| export RP_SECRET_TOKEN='pumarules' | |
| export ENDECA_DEBUG='true' | |
| alias cdag='cd ~/source/ag' | |
| alias cdmdot='cd ~/source/m.apartmentguide' | |
| alias cdrentals='cd ~/source/rentals' | |
| alias cdmdotrentals='cd ~/source/m.rentals' | |
| alias idg_restart='idg stop && sleep 2 && idg startup' | |
| alias iss='idg stop && sleep 2 && idg start' | |
| alias issmdot='idg stop && sleep 2 && idg start mdot' | |
| alias ix='idg stop' | |
| alias dns_flush='dscacheutil -flushcache;sudo killall -HUP mDNSResponder' | |
| alias pivotal_number="git rev-parse --abbrev-ref HEAD | egrep -o '\d+'| head -n 1 | tr -d '\n'" | |
| alias pivotal_copy="pivotal_number | pbcopy" | |
| alias jj="jam upgrade && jam install" | |
| alias remove_vcr_cassettes="rm -rf spec/vcr_cassettes/*.yml" | |
| alias rp_nginx='ruby -i -pe '$_.gsub!(%{[REPLACE_ME]}, ENV["HOME"])' *.conf' | |
| # alias gather_initials=ruby -e "branch = `git rev-parse --abbrev-ref HEAD`.chomp | egrep -o '[A-Z]{2,3}'| tr -d '\n'" #| pbcopy | |
| function gather_initials(){ | |
| ruby -e 'b=`git rev-parse --abbrev-ref HEAD`.chomp; puts "[#{b.scan(/[A-Z]{2,3}/).reject("AG").join("|")}]"' | |
| } | |
| export RACK_ENV=development | |
| # from thomas (TJ Stankus) | |
| alias cppwd="pwd | tr -d '\n' | pbcopy" | |
| # shims | |
| eval "$($HOME/source/idg/bin/idg init -)" | |
| function rpcopy(){ | |
| cat ~/.rentpath | tr -d '\n' | pbcopy | |
| } | |
| function standup(){ | |
| open -a Safari.app 'http://www4.gotomeeting.com/join/757080295' | |
| } | |
| function tech_talk(){ | |
| open -a Safari.app "https://www4.gotomeeting.com/join/495279919" | |
| } | |
| function book_club(){ | |
| # open -a Safari.app "https://www4.gotomeeting.com/join/399012631/106853239" | |
| open -a Safari.app "https://www4.gotomeeting.com/join/399012631" | |
| } | |
| function sprint_planning(){ | |
| open -a Safari.app "https://www4.gotomeeting.com/join/452903807" | |
| } | |
| function ten_percent_planning(){ | |
| # id="452903807" | |
| id="327575783" | |
| open -a Safari.app "https://www4.gotomeeting.com/join/$id" | |
| # 495279919 | |
| } | |
| function go_no_go(){ | |
| open -a Safari.app "https://www4.gotomeeting.com/join/410519951" | |
| } | |
| function retro(){ | |
| open -a Safari.app "https://www4.gotomeeting.com/join/113709047" | |
| } | |
| # export ENDECA_DEBUG=true | |
| function deployment(){ | |
| git checkout dev | |
| git pull --rebase | |
| git checkout qa | |
| git pull --rebase | |
| git merge dev | |
| # git push origin qa | |
| # if [[ $1 == "major" ]]; then | |
| # rake qa:release:new | |
| # elif [[ $1 == "major" ]]; then | |
| # fi | |
| # 2. Create the appropriate git tags. | |
| # For minor releases: | |
| # rake qa:release:update | |
| # For major releases: | |
| # rake qa:release:new #press enter if new tag is correct | |
| # 3. Do the deploy! | |
| # ssh username@bot.lab.primedia.com | |
| # sudo su - deploy | |
| # cd source/sitename | |
| # git checkout qa | |
| # git pull --rebase | |
| # cap qa deploy:full | |
| # Check http://www.qa.rentals.com/ops/version/ to confirm | |
| } | |
| function kill_pumas() { | |
| pgrep puma | xargs kill -9 | |
| } | |
| function update_all() { | |
| for dir in $HOME/source/*; do | |
| ( cd "$dir" && git smart-pull > /dev/null 2>&1) | |
| done | |
| } | |
| function bundle_all() { | |
| for dir in $HOME/source/*; do | |
| ( cd "$dir" && git checkout dev && bundle install ) | |
| done | |
| } | |
| function push-branch-pull-request(){ | |
| # depends on git-default-branch | |
| branch_name=`git rev-parse --abbrev-ref HEAD | tr -d '\n'` | |
| g push origin $branch_name | |
| hub pull-request -b primedia:$(git default-branch) -h primedia:$branch_name | |
| #echo "primedia:$(git default-branch)" | |
| } | |
| function pull-request(){ | |
| branch_name=`git rev-parse --abbrev-ref HEAD | tr -d '\n'` | |
| hub pull-request -b primedia:dev -h primedia:$branch_name | |
| } | |
| function gtm(){ | |
| # open 'gotomeeting://SALaunch?Action=Join&MeetingID=123456789' | |
| # Usage: gtm 410519951 | |
| number=`echo $1 | sed 's/-//g'` | |
| open "gotomeeting://SALaunch?Action=Join&MeetingID=$number" | |
| } | |
| function PRS(){ | |
| open https://github.com/dashboard/pulls | |
| } | |
| function idg_log_curl(){ | |
| curl -O http://logstorage01.nor.primedia.com/services/dal/ren-phy-[02-04].dal/rails/2013/09/{production,unicorn.stderr,unicorn.stdout}.log-201309[11-12]-[00-23].gz | |
| # curl -O http://logstorage01.nor.primedia.com/services/dal/ren-phy-[02-04].dal/rails/2013/09/unicorn.stderr.log-201309[11-12]-[00-23].gz | |
| # curl -O http://logstorage01.nor.primedia.com/services/dal/ren-phy-[02-04].dal/rails/2013/09/unicorn.stdout.log-201309[11-12]-[00-23].gz | |
| } | |
| # function ag_ci_ops(){ | |
| # open http://www.qa.apartmentguide.com/ops/version | |
| # } | |
| RENTPATH_LOGDIR="/var/log/primedia" | |
| RENTPATH_SOURCE_DIR="$HOME/source" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment