Skip to content

Instantly share code, notes, and snippets.

View holodigm's full-sized avatar

Kym McInerney holodigm

View GitHub Profile
@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
}
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