Skip to content

Instantly share code, notes, and snippets.

Drew Petersen kirbysayshi

View GitHub Profile
View access_error.log
rhizome 0.7.0
(!) no osc server
(*) HTTP server running at http://<serverIP>:80/
serving content from /Users/drewp/Dropbox/js/synae-server/public
(*) websockets server running on port 80
::ffff:192.168.4.17 - - [24/Sep/2015:13:04:49 +0000] "GET /rhizome-identify?id=voqjxtytvP6av0W1 HTTP/1.1" 404 49 "http://192.168.4.17/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:42.0) Gecko/20100101 Firefox/42.0"
::ffff:192.168.4.17 - - [24/Sep/2015:13:04:56 +0000] "GET /rhizome-identify?id=voqjxtytvP6av0W1 HTTP/1.1" 404 49 "http://192.168.4.17/?conductor" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:42.0) Gecko/20100101 Firefox/42.0"
rhizome 0.7.0
(!) no osc server
(*) HTTP server running at http://<serverIP>:80/
@kirbysayshi
kirbysayshi / notes.md
Created Nov 23, 2015
windows to go notes
View notes.md
@kirbysayshi
kirbysayshi / .babelrc
Last active Nov 11, 2015
show how babelify fails to read babelrc
View .babelrc
{
"presets": [
"es2015",
"stage-0"
]
}
@kirbysayshi
kirbysayshi / index.js
Last active Oct 14, 2015
requirebin sketch
View index.js
var Pocket = require('pocket-ces');
var arbit = require('arbit');
var pkt = new Pocket();
var random = arbit();
var uiHTML = ''
+ '<button onclick="handlePlantSeedClick()">Plant a seed</button>'
+ '<button onclick="handleTickClick()">Walk through the fields</button>'
+ '<button onclick="handleHarvestClick()">Harvest!</button>'
@kirbysayshi
kirbysayshi / index.js
Created Oct 8, 2015
requirebin sketch
View index.js
var Pocket = require('pocket-ces');
var arbit = require('arbit');
var pkt = new Pocket();
var random = arbit();
var uiHTML = ''
+ '<button onclick="handlePlantSeedClick()">Plant a seed</button>'
+ '<button onclick="handleTickClick()">Walk through the fields</button>'
+ '<button onclick="handleHarvestClick()">Harvest!</button>'
@kirbysayshi
kirbysayshi / index.js
Last active Sep 21, 2015
requirebin sketch
View index.js
var binaryxhr = require('binary-xhr');
var actx = null;
function kick () {
var audioContext = new webkitAudioContext()
var osc = audioContext.createOscillator()
var gain = audioContext.createGain()
gain.gain.value = 0
osc.connect(gain)
@kirbysayshi
kirbysayshi / multidimensional-dtw.js
Created Sep 15, 2015
override dtw's (https://github.com/langholz/dtw) silly 1-dimensional validation.
View multidimensional-dtw.js
var DTW = require('./');
//var DTW = require('dtw');
var validate = require('./lib/validate');
// Monkey patch to allow for non-numeric input
validate.sequence = function() {};
var template = makeSeries([], 0, Math.PI*2);
@kirbysayshi
kirbysayshi / _README.md
Last active Aug 26, 2015
imports vs require
View _README.md

import is hoisted, meaning transition to import from require can be non-trivial if relying on app-wide dependencies to be initialized before use.

$ npm run import

> import-test@0.0.0 import /Users/drewp/GIT/import-test-gist
> babel-node index-import.js

exec a
exec c
@kirbysayshi
kirbysayshi / howhowhow.markdown
Last active Aug 29, 2015
Is any variant of this possible in ES6 modules / destructuring?
View howhowhow.markdown

I have a big fat object that is structured like this (using CJS format to remove all ambiguity):

// big-fat-package.js
module.exports = {
  runtime: {
    compile: function() {},
    partials: {
      'non-valid-identifier-property-0': function() {},
      'non-valid-identifier-property-1': function() {},
You can’t perform that action at this time.