Call actions on stores RESTfully:
// C
BotActions.save(null, {name: 'Curly', age: 26}); // POST a model without an id
// R
BotActions.fetch(); // GET the whole Collection
BotActions.fetch(2); // GET a single model by id
var rules = [], each = [].forEach; | |
each.call(document.styleSheets, function(s) { | |
s.cssRules && each.call(s.cssRules, function(rule) { | |
rule.media && rules.push(rule.media[0]); | |
}) | |
}); |
fs = require 'fs' | |
xml2js = require('xml2js').parseString | |
fs.readFile "#{__dirname}/history.kml", (err, data) -> | |
xml2js data, (err, result) -> | |
doc = result.kml.Document[0].Placemark[0]['gx:Track'][0] | |
points = | |
type: "Feature" | |
properties: {} |
var Handlebars = require('handlebars'), | |
fs = require('fs'); | |
require.extensions['.hbs'] = function (module, filename) { | |
var raw = fs.readFileSync(filename, 'utf8'); | |
return Handlebars.compile(raw); | |
} |
{requestInterval, clearRequestInterval} = require './animation-helpers' | |
NUM_CIRCLES = 2500 | |
MAX_RADIUS = 80 | |
MIN_RADIUS = 4 | |
bgCanvas = document.getElementById "bg" | |
fgCanvas = document.getElementById "fg" | |
bg = bgCanvas.getContext "2d" | |
fg = fgCanvas.getContext "2d" |
var jsdom = require('jsdom').jsdom; | |
global.document = jsdom(); | |
global.window = document.parentWindow; | |
var Backbone = require('backbone'); | |
Backbone.$ = require('jquery'); |
# Get a notification when a user starts and stops typing on the passed-in `el`. | |
# | |
# Based on https://github.com/narfdotpl/jquery-typing | |
module.exports = (el, {delay, start, stop}) -> | |
delay ||= 400 | |
typing = false | |
timeout = null |
Call actions on stores RESTfully:
// C
BotActions.save(null, {name: 'Curly', age: 26}); // POST a model without an id
// R
BotActions.fetch(); // GET the whole Collection
BotActions.fetch(2); // GET a single model by id
node_modules | |
out.js* |
Today, I went record shopping in Greenwich Village. | |
I bought this record, but I can't seem to find the hi-fi. | |
Didn't I give you my old record player? | |
Cosmo? | |
Who's Cosmo? | |
Well, I want it back. | |
I wanna listen to that cha-cha record. | |
(putting down the bowl) Lemme change my shirt. | |
Thank you, Kramer. | |
(indicating a chair) Put it over there. |