Skip to content

Instantly share code, notes, and snippets.

View workling-edits.rb
require 'rubygems'
require 'optparse'
require 'yaml'
options = {}
ARGV.options do |opts|
opts.on( "-c", "--configfile ENVIRONMENT", String,
"mongrel cluster config file." ) do |config_file|
options[:config_file] = config_file
View gist:216443
¦-) as opposed to |
⍥ om nom nom
rubiojr / mr_status_bar_app.rb
Created Nov 30, 2009
MacRuby StatusBar Application
View mr_status_bar_app.rb
# Initialize the stuff
# We build the status bar item menu
def setupMenu
menu =
menu.initWithTitle 'FooApp'
mi =
mi.title = 'Hellow from MacRuby!'
mi.action = 'sayHello:'

GitHub OAuth Busy Developer's Guide

This is a quick guide to OAuth2 support in GitHub for developers. This is still experimental and could change at any moment. This Gist will serve as a living document until it becomes finalized at

OAuth2 is a protocol that lets external apps request authorization to private details in your GitHub account without getting your password. All developers need to register their application before getting started.

Web Application Flow

  • Redirect to this link to request GitHub access:
View CampfireIcons.txt
peterc / deploy.rake
Created Feb 12, 2011
I can't be bothered with all of these fancy deployment systems. This works for me! Lazzzzy...
View deploy.rake
desc "Deploy site"
task :deploy do
sh %{git push origin master}
sh %{ssh server "cd /var/www/;git pull;bundle check || bundle;rake db:migrate;touch tmp/restart.txt;chown -R app:app *"}
View gist:885658
USEFUL ONE-LINE SCRIPTS FOR SED (Unix stream editor) Dec. 29, 2005
Compiled by Eric Pement - pemente[at]northpark[dot]edu version 5.5
Latest version of this file (in English) is usually at:
This file will also available in other languages:
Chinese -

Keeping it Simple

  • # You need to log in

Simple Mobile + Native

defunkt / gitio
Created Sep 11, 2011
Turn a URL into a URL.
View gitio
#!/usr/bin/env ruby
# Usage: gitio URL [CODE]
# Turns a URL
# into a URL
# Copies the URL to your clipboard.
url = ARGV[0]
code = ARGV[1]
rtomayko / latency.txt
Created Jun 1, 2012 — forked from jhclark/latency.txt
Latency numbers every programmer should know
View latency.txt
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns
Send 1K bytes over 1 Gbps network 10,000 ns 0.01 ms
Read 1 MB sequentially from memory 250,000 ns 0.25 ms
Round trip within same datacenter 500,000 ns 0.5 ms
Read 1 MB sequentially from SSD 1,000,000 ns 1 ms 4X memory