This is now published as a module multi-duplex-stream
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
'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
(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' | |
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
@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
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
^([a-z]+)? #Element | |
(?:(\.-?[_a-zA-Z]+[_a-zA-Z0-9-]*)| #classes | |
(?:#[A-Za-z][-A-Za-z0-9_:.]*)| # Id | |
(\[[a-zA-Z-]+(?:=["']?.*["']?)?\]))* #Attribute | |
(\{.*\})? #Text Content |
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
const html = require('yo-yo') | |
const struct = require('observ-struct') | |
const value = require('observ') | |
const list = require('observ-array') | |
const EventEmitter = require('event').Emitter | |
function autocomplete () { | |
var state = struct({ | |
name: value(Math.random().toString(16)), |
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
const hyperdrive = require('hyperdrive') | |
const level = require('level-party') | |
const raf = require('random-access-file') | |
const path = require('path') | |
const chokidar = require('chokidar') | |
const swarm = require('discovery-swarm')() | |
const archiveSwarm = require('hyperdrive-archive-swarm') | |
const lpm = require('length-prefixed-message') |