Skip to content

Instantly share code, notes, and snippets.

Ryan Rauh rauhryan

Block or report user

Report or block rauhryan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
didip / supervisord-example.conf
Created Jan 30, 2011
Example configuration file for supervisord.conf
View supervisord-example.conf
file=/tmp/supervisor.sock ; path to your socket file
logfile=/var/log/supervisord/supervisord.log ; supervisord log file
logfile_maxbytes=50MB ; maximum size of logfile before rotation
logfile_backups=10 ; number of backed up logfiles
loglevel=error ; info, debug, warn, trace
pidfile=/var/run/ ; pidfile location
nodaemon=false ; run supervisord as a daemon
rauhryan / chads.cs
Created Oct 25, 2011
Future AST post
View chads.cs
public int add(int a, int b)
return a + b;
public int subtract(int a, int b)
return a - b;
View data_icon.css
span[data-icon]:before {
font-family: 'Icon Font Here';
content: attr(data-icon);
This would also work, but other web developers might
yell at you about "performance" which may/not matter:
mislav / stupid-json.rb
Created Dec 21, 2011
Stupid simple JSON parser & generator
View stupid-json.rb
# encoding: utf-8
## Stupid small pure Ruby JSON parser & generator.
# Copyright © 2013 Mislav Marohnić
# Permission is hereby granted, free of charge, to any person obtaining a copy of this
# software and associated documentation files (the “Software”), to deal in the Software
# without restriction, including without limitation the rights to use, copy, modify,
# merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
lancejpollard /
Created May 22, 2012
Notes on Ember.js overcomplicating...

Some random notes on the pangs of ember. Will be expanding as they are uncovered.

Building a form

Say you have a form that maps to a model, something like:

    <legend>Who are you?</legend>
maccman / juggernaut.rb
Created Jun 26, 2012
Sinatra Server Side Event streaming.
View juggernaut.rb
# Usage: redis-cli publish message hello
require 'sinatra'
require 'redis'
conns = []
get '/' do
erb :index
maccman / juggernaut_channels.rb
Created Jun 26, 2012
Sinatra Server Side Event streaming with private channels.
View juggernaut_channels.rb
# Usage: redis-cli publish message.achannel hello
require 'sinatra'
require 'redis'
conns = {|h, k| h[k] = [] }
Thread.abort_on_exception = true
get '/' do
bru / Gemfile
Created Aug 4, 2012
Sinatra HStore setup
View Gemfile
source :rubygems gem "sinatra"
gem "pg" gem "activerecord-postgres-hstore"
gem "sinatra-activerecord"
piscisaureus /
Created Aug 13, 2012
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url =

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

MrSwitch / saveAs.js
Created Aug 31, 2012
FileSaver window.saveAs shim
View saveAs.js
// window.saveAs
// Shims the saveAs method, using saveBlob in IE10.
// And for when Chrome and FireFox get round to implementing saveAs we have their vendor prefixes ready.
// But otherwise this creates a object URL resource and opens it on an anchor tag which contains the "download" attribute (Chrome)
// ... or opens it in a new tab (FireFox)
// @author Andrew Dodson
// @copyright MIT, BSD. Free to clone, modify and distribute for commercial and personal use.
window.saveAs || ( window.saveAs = (window.navigator.msSaveBlob ? function(b,n){ return window.navigator.msSaveBlob(b,n); } : false) || window.webkitSaveAs || window.mozSaveAs || window.msSaveAs || (function(){
You can’t perform that action at this time.