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
git checkout master | |
git fetch | |
git remote prune origin | |
git branch --merged master | grep -v 'master$' | xargs git branch -d | |
git branch -r --merged master | sed 's/ *origin\///' | grep -v 'master$' | |
read -p "Continue (y/n)? " | |
if [ "$REPLY" == "y" ] | |
then | |
git branch -r --merged master | sed 's/ *origin\///' | grep -v 'master$' | xargs -I% git push origin :% |
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
curl -u <token>:x-oauth-basic -s https://api.github.com/orgs/<repo-name>/repos\?per_page\=200 | ruby -rubygems -e 'require "json"; JSON.load(STDIN.read).each { |repo| %x[git clone #{repo["ssh_url"]} ]}' |
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
#!/bin/bash | |
# define $SHELL_VARS here | |
report_error () { | |
MESSAGE=$1 | |
SUBJECT=$2 | |
echo "$MESSAGE" | $MAILPROGRAM --subject="$SUBJECT" --toList=$EMAIL | |
} |
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
### Keybase proof | |
I hereby claim: | |
* I am holodigm on github. | |
* I am kym (https://keybase.io/kym) on keybase. | |
* I have a public key whose fingerprint is 6EB4 041C 7221 4C8E E8CD A12A 8AEF B958 3B45 D31B | |
To claim this, I am signing this object: |
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
apt-add-repository ppa:brightbox/ruby-ng | |
apt-get update | |
apt-get install python-software-properties -y | |
apt-get install ruby rubygems ruby-switch ruby2.1 ruby2.1-dev -y | |
ruby-switch --set ruby2.1 | |
gem install bundler | |
ruby -v | |
apt-get purge nginx* -y | |
echo "deb http://nginx.org/packages/ubuntu/ precise nginx" >> /etc/apt/sources.list |
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
apt-get install python-software-properties | |
apt-add-repository ppa:brightbox/ruby-ng | |
apt-get update | |
apt-get install ruby rubygems ruby-switch ruby2.1 ruby2.1-dev -y | |
ruby-switch --set ruby2.1 | |
gem install bundler |
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
class ApplicationController < ActionController::Base | |
... | |
# FORCE to implement content_for in controller | |
def view_context | |
super.tap do |view| | |
(@_content_for || {}).each do |name,content| | |
view.content_for name, content | |
end | |
end | |
end |