This file contains hidden or 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
var allTheaters = []; | |
var nycZips = [ | |
// Greenpoint | |
11211, 11222, | |
// Bushwick & Williamsburg | |
11206, 11221, 11237, | |
// Greenwich Village & Soho |
This file contains hidden or 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
var SelectView = Backbone.View.extend({ | |
el: '#my-select', | |
events: { | |
'change': 'addToList' | |
}, | |
render: function() { | |
this.collection.each(function(item) { | |
var optionView = new OptionView({model: item}); |
This file contains hidden or 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
var runner = document.querySelector('.ticker'), // a <ul> | |
frames = runner.children, | |
timeout = 4000; // in ms | |
var cycleFrames = function() { | |
var child = runner.removeChild(frames[0]).cloneNode(true); | |
runner.appendChild(child); | |
} | |
// from https://gist.github.com/joelambert/1002116 |
This file contains hidden or 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
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]); | |
}) | |
}); |
This file contains hidden or 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
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: {} |
This file contains hidden or 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
var Handlebars = require('handlebars'), | |
fs = require('fs'); | |
require.extensions['.hbs'] = function (module, filename) { | |
var raw = fs.readFileSync(filename, 'utf8'); | |
return Handlebars.compile(raw); | |
} |
This file contains hidden or 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
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. |
This file contains hidden or 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
{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" |
This file contains hidden or 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
var jsdom = require('jsdom').jsdom; | |
global.document = jsdom(); | |
global.window = document.parentWindow; | |
var Backbone = require('backbone'); | |
Backbone.$ = require('jquery'); |
OlderNewer