This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add this to your global ~/.gitconfig so that your read-only | |
# Git URLs (e.g. in submodules) are swapped out for your | |
# read-write URL | |
# | |
[url "https://[email protected]/USERNAME/"] | |
insteadOf = "git://github.com/USERNAME/" | |
insteadOf = "http://github.com/USERNAME/" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Rack | |
class DeflaterWithExclusions < Deflater | |
def initialize(app, options = {}) | |
@app = app | |
@exclude = options[:exclude] | |
end | |
def call(env) | |
if @exclude && @exclude.call(env) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This gist is based on eve (https://github.com/adobe-webplatform/eve), but really any event based API will do | |
// Idea is to recreate backbone-like model, but on events only | |
// Model here is a hash-map, but it shouldn’t be. You could implement any structure this way. | |
function model(id) { | |
var modelid = ["model", id], | |
name = function () { | |
return modelid.concat.apply(modelid, arguments); | |
}; |