Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env ruby
class Utils
def self.staged_files(*dirs)
@staged_files ||= `git diff --cached --name-only #{dirs.join(' ')} | xargs`.chomp
end
end
@jish
jish / compare.js
Created December 3, 2009 18:41 — forked from wycats/compare.js
// prototype
new Ajax.Request("/your/mom", onSuccess: function(response) { $("lightbox_content").innerHTML = response.responseJSON.contents })
new Ajax.Updater("lightbox_content", "/your/mom");
// jquery
$.getJSON("/your/mom", function(json) { $("#lightbox_content").html(json.contents) })