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
license: gpl-3.0 |
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
@import 'normalize.css'; |
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
'use strict' | |
var d3 = require('d3') | |
var speakerInput = window.document.getElementById('speaker') | |
var dateInput = window.document.getElementById('date') | |
var wordInput = window.document.getElementById('words') | |
var speechInput = window.document.getElementById('speech') | |
var csvOutput = window.document.getElementById('output') |
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 e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ | |
var d3 = require('d3') | |
var c = require('d3-convention')() | |
var prng = require('xorshift').constructor([172, 26, 125, 42]) | |
var sample = require('poisson-disc-sampler')(c.innerWidth, c.innerHeight, 4, prng.random.bind(prng)) | |
var ctn = 0 | |
d3.timer(function () { | |
for (var i = 0; i < 10; i++) { |
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
'use strict'; | |
//Inspired by http://bl.ocks.org/mbostock/517fdb49f959cb1461e2 | |
var poissonDiscSampler = require('poisson-disc-sampler'); | |
var d3 = require('d3'); | |
var raf = require('raf'); | |
var width = window.innerWidth; | |
var height = window.innerHeight; | |
var drift = 30; |
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
'use strict'; | |
/* | |
var a = cappedArray(3); //limited to 3 items | |
var b = cappedArray(1, 2, 3); //limited to 3 items, populated with [1, 2, 3] | |
a.concat(b, 10); //deepEqaul to `cappedArray(2, 3, 10);` | |
*/ | |
module.exports = function cappedArray(size) { | |
var self = []; |
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 stream = require('stream'); | |
var outer = 0, inner = 0; | |
var collectorStream = stream.Readable({ | |
highWaterMark: 1, | |
objectMode: true, | |
read: function() { | |
var self = this; | |
var id1 = outer++; |
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
{ | |
"name": "minimal-protected-server", | |
"version": "0.0.0", | |
"description": "Minimal password protected server", | |
"main": "server.js", | |
"dependencies": { | |
"basic": "0.0.3", | |
"st": "^0.5.3" | |
} | |
} |
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
'use strict'; | |
exports.get = function(document, pointer) { | |
//Empty pointer references the whole document | |
if(pointer === '') return document; | |
//Split the pointer into reference tokens and unescape | |
var referenceTokens = pointer.slice(1).split('/').map(unescape); | |
//Decent down the object iteratively | |
return referenceTokens.reduce(function(object, token) { |
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 stream = require('stream'); | |
var messageStream = require('./message-stream'); | |
var jsonify = new stream.Transform({ | |
writableObjectMode: true, | |
transform: function(chunk, enc, cb) { | |
this.push(JSON.stringify(chunk, null, 2) + '\n'); | |
cb(); | |
} | |
}); |