- Instant visual output.
- Fast startup time, fast execution.
- Sensible errors, with code locations.
- Easy to set up and get working.
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
var React = require('react'); | |
var { Component, PropTypes } = React; | |
var throttle = require('lodash/function/throttle'); | |
class InfiniteScroll extends React.Component { | |
static propTypes = { | |
hasMore: PropTypes.bool.isRequired, | |
isLoading: PropTypes.bool.isRequired, | |
onLoadMore: PropTypes.func.isRequired, | |
threshold: PropTypes.number, |
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
var promiseCSV = require('promiseCSV.js'); | |
var path = "in.csv"; | |
var options = { 'headers': true }; | |
promiseCSV(path, options).then(function (records) { | |
// do other stuff | |
}); |
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
var express = require('express'); | |
var app = express(); | |
var router = express.Router(); | |
var hbs = require('hbs'); | |
app.set('view engine', 'html'); | |
app.engine('html', hbs.__express); | |
app.use(express.json()); | |
app.use(express.urlencoded()); |
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
/** @jsx React.DOM */ | |
'use strict'; | |
var React = require('react'), | |
escapeTextForBrowser = require('react/lib/escapeTextForBrowser'), | |
{ PropTypes } = React; | |
var UncontrolledContentEditable = React.createClass({ | |
propTypes: { | |
component: PropTypes.func, |
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
EventEmitter = (require?("./EventEmitter") || Framer).EventEmitter | |
class AppStateMachine extends EventEmitter | |
constructor: -> | |
@states = [] | |
# Start the state machine with the document's hash, or the given route | |
start: (name) -> | |
@go if document.location.hash then document.location.hash[1..-1] else name |
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
rows = 30 | |
cols = 30 | |
gutter = 16 | |
width = 50 | |
height = 50 | |
for rowIndex in [0..rows-1] | |
for colIndex in [0..cols-1] | |
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
$(function(){ | |
var formUrl = '/* ex: https://docs.google.com/a/developmentseed.org/spreadsheet/formResponse?formkey=... */'; | |
// Set up map | |
var m = mapbox.map('map').addLayer(mapbox.layer().id(' /* mapbox-account.id */ ')); | |
// Set up map ui features with point selector | |
var ui = mapbox.ui().map(m).auto().pointselector(function(d) { | |
// Remove all points except the most recent |
NewerOlder