Skip to content

Instantly share code, notes, and snippets.

View msaffitz's full-sized avatar

Mike Saffitz msaffitz

View GitHub Profile
@glebm
glebm / rainbows.production.conf
Created October 24, 2012 15:57
Example Rainbows Config
# -*- encoding : utf-8 -*-
#= Rainbows HTTP server (on unix socket!)
#== Rainbows can be used to manage multiple forked workers in a specified concurrency-IO model
# Set working directory for Capistrano
# pwd -L keeps symlinks
working_directory `pwd -L`.chomp
# Listen through a unix socket
@irasally
irasally / run.sh
Created October 3, 2012 05:07
[mongodb] run command 'compact' for all collections
#!/bin/sh
mongo localhost:27017/mongo run_command.js
mongo localhost:27018/mongo run_command.js
mongo localhost:27019/mongo run_command.js
# if you don't need connection infomation etc., use --quiet option.
# http://www.mongodb.org/display/DOCS/--quiet
@jspaper
jspaper / YahooToken.rb
Created May 25, 2012 14:18
yahoo api with oauth-plugin
class YahooToken < ConsumerToken
YAHOO_SETTINGS={
:site => "https://api.login.yahoo.com",
:request_token_path => "/oauth/v2/get_request_token",
:access_token_path => "/oauth/v2/get_token",
:authorize_path=> "/oauth/v2/request_auth"
}
def self.consumer
@timoxley
timoxley / js-bundler.coffee
Created July 20, 2011 05:42
Bundle all js files in ./scripts to ./application.js using Stitch
argv = process.argv.slice(2)
stitch = require('stitch')
fs = require('fs')
mode = argv[0] || "DEV"
package = stitch.createPackage
paths: [__dirname + '/scripts']