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 baudio = require('webaudio') | |
var tau = Math.PI * 2 | |
var audio = new AudioContext() | |
getNotes().forEach(function (item, i) { | |
var note = item[0] | |
var freq = item[1] | |
var el = document.createElement('button') |
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 SimpleTimeseries = require('simple-timeseries') | |
var data = getData() | |
var opts = { | |
width: 500, | |
height: 300, | |
yLabel: 'Price' | |
} |
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 testBed = require('canvas-testbed'); | |
var timeStart = Date.now() | |
//called every frame | |
function render(context, width, height) { | |
var now = Date.now() | |
var msElapsed = now - timeStart | |
context.clearRect(0, 0, width, height) |
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
# You don't need Fog in Ruby or some other library to upload to S3 -- shell works perfectly fine | |
# This is how I upload my new Sol Trader builds (http://soltrader.net) | |
# Based on a modified script from here: http://tmont.com/blargh/2014/1/uploading-to-s3-in-bash | |
S3KEY="my aws key" | |
S3SECRET="my aws secret" # pass these in | |
function putS3 | |
{ | |
path=$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
var ReactPivot = require('react-pivot/load') | |
ReactPivot(document.body, { | |
rows: getData(), | |
dimensions: [ | |
{value: 'firstName', title: 'First Name'}, | |
{value: 'lastName', title: 'Last 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
var cssify = require('cssify') | |
cssify.byUrl('//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css') | |
var jsonist = require('jsonist') | |
var hypnotable = require('hypnotable') | |
var accounting = require('accounting') | |
var columns = | |
[ { title: 'Low', property: function(spread) {return spread.low.strike}, template: formatMoney } | |
, { title: 'Vol', property: function(spread) {return spread.low.volume}, template: formatNumber } |
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 tape = require('tape') | |
var bitfield = new Buffer(require('./fixtures/location-bitfield.json')) | |
tape.only('should parse location bitfield', function(t) { | |
var parsed = parse(bitfield) | |
var expected = { | |
deltaHeading: 0, | |
x: 10936, | |
y: 7856, |
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
// Our RequestAnimationFrame helper | |
var raf = require('raf') | |
var ease = require('ease-component') | |
// Create our canvas and add it to the page | |
var canvas = document.createElement('canvas') | |
document.body.appendChild(canvas) | |
var ctx = canvas.getContext('2d') | |
// Make the canvas fullscreen and keep track of the width/height |
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
// Our RequestAnimationFrame helper | |
var raf = require('raf') | |
var ease = require('ease-component') | |
// Create our canvas and add it to the page | |
var canvas = document.createElement('canvas') | |
document.body.appendChild(canvas) | |
var ctx = canvas.getContext('2d') | |
// Make the canvas fullscreen and keep track of the width/height |
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
// Our RequestAnimationFrame helper | |
var raf = require('raf') | |
var ease = require('ease-component') | |
// Create our canvas and add it to the page | |
var canvas = document.createElement('canvas') | |
document.body.appendChild(canvas) | |
var ctx = canvas.getContext('2d') | |
// Make the canvas fullscreen and keep track of the width/height |