Skip to content

Instantly share code, notes, and snippets.

View jedschneider's full-sized avatar

Jed Schneider jedschneider

View GitHub Profile
@jedschneider
jedschneider / .cook
Created August 5, 2012 01:01 — forked from gvarela/.cook
default developer image
{
"imagemagick": {"ghostscript": true},
"redis": {"launchd": true},
"rbenv": {"versions": ["1.9.3-p194"]},
"basic_brew": {"formulae": [
"bash-completion",
"wget",
"android-sdk"
]},
@jedschneider
jedschneider / .cook
Created August 5, 2012 01:04 — forked from gvarela/.cook
default developer image
{
"imagemagick": {"ghostscript": true},
"redis": {"launchd": true},
"rbenv": {"versions": ["1.9.3-p194"]},
"basic_brew": {"formulae": [
"bash-completion",
"wget",
"android-sdk"
]},
class Mustachio extends Backbone.View
render: (template_id, context) ->
@templates[template_id].call @, context
@prepare = ->
templates = {}
raw_templates = $('script[type="text/x-handlebars-template"]')
raw_templates.each (i, template) ->
$template = $(template)
var Storage = (function() {
var uniqueId = 0;
function Storage() {}
Storage.prototype.add = function(item) {
var id = this.generateId()
, data = this._toJSON(item);
localStorage[id] = data;
};