Skip to content

Instantly share code, notes, and snippets.

View nathany's full-sized avatar
🙃

Nathan Youngman nathany

🙃
View GitHub Profile
@jeremi
jeremi / fabfile.py
Created November 4, 2010 21:00
A fabfile to manage git+appengine deployement
from __future__ import with_statement
import functools
import os
import sys
from fabric.api import *
from fabric.colors import green, red, green
import datetime
import re
director routing_mesh round-robin {
{
.backend = {
.host = "...some ip...";
.port = "...some port...";
.first_byte_timeout = 90s;
.between_bytes_timeout = 90s;
}
# ...more backends...
}
# Allow RSpec assertions over the elements of a collection. For example:
#
# collection.should all_be > 0
#
# will specify that each element of the collection should be greater
# than zero. Each element of the collection that fails the test will
# be reported in the error message.
#
# Examples:
# [1,1,1].should all_be eq(1)
@qrush
qrush / gist:532115
Created August 17, 2010 21:23
new resolver api
require 'open-uri'
require 'pp'
pp Marshal.load(open("http://localhost:3000/api/v1/dependencies?gems=rails,rack,clearance,fog,paperclip"))
require 'minitest/unit'
require 'minitest/spec'
require 'rubygems'
require 'ansi'
class MiniTest::Unit
include ANSI::Code
PADDING_SIZE = 4
@remy
remy / gist:330318
Created March 12, 2010 13:59
autofocus and placeholder support
/**
* Add this script to the end of your document that use <input autofocus type="text" />
* or <input type="text" placeholder="username" /> and it'll plug support for browser
* without these attributes
* Minified version at the bottom
*/
(function () {
function each(list, fn) {
var l = list.length;
@nathany
nathany / show SQL in irb console
Created March 11, 2010 17:31
Rails SQL logging from console
ActiveRecord::Base.connection.instance_variable_set :@logger, Logger.new(STDOUT)