Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View holodigm's full-sized avatar

Kym McInerney holodigm

View GitHub Profile
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 :%
@holodigm
holodigm / clone-all-github-repos.sh
Last active May 19, 2016 12:49 — forked from caniszczyk/clone-all-twitter-github-repos.sh
Clone all repos from a GitHub organization
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"]} ]}'
#!/bin/bash
# define $SHELL_VARS here
report_error () {
MESSAGE=$1
SUBJECT=$2
echo "$MESSAGE" | $MAILPROGRAM --subject="$SUBJECT" --toList=$EMAIL
}
### 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:
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
@holodigm
holodigm / gist:11391921
Last active August 29, 2015 14:00
get ruby on ubuntu 12
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
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