Skip to content

Instantly share code, notes, and snippets.

View bingomanatee's full-sized avatar

Dave Edelhart bingomanatee

View GitHub Profile
@bingomanatee
bingomanatee / scroll_test.js
Created April 27, 2014 19:00
canvas / easel fail?
var wd = require('wd');
var browser = wd.promiseChainRemote();
var fs = require('fs');
var util = require('util');
var _ = require('lodash');
var Canvas = require('canvas');
require('node-easel');
var easel = createjs; // bad news -- uses global space.
@bingomanatee
bingomanatee / makingterrain.cs
Created March 30, 2014 16:49
trying to add perlin to terrain -- not seeing terrain get bumpy
using UnityEngine;
using System.Collections;
public class Map
{
public string name = "Unnamed";
public int width = 128;
public int depth = 128;
GameObject terrain;
@bingomanatee
bingomanatee / smoothSeries_nor.js
Created February 18, 2014 18:23
A function that takes in a set of numbers -- or an array of numbers -- and smooths values that seem like outliers, based on standard deviation. Not included is the underscorej.s library available at http://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.2/underscore-min.js. The actual libarary begins at line 1200; the first lines are a statisti…
(function (window) {
var ss = function () {
// # simple-statistics
//
// A simple, literate statistics system. The code below uses the
// [Javascript module pattern](http://www.adequatelygood.com/2010/3/JavaScript-Module-Pattern-In-Depth),
// eventually assigning `simple-statistics` to `ss` in browsers or the
// `exports object for node.js
var assert = require('assert');
var phantomjsWrapper = require('phantomjs-wrapper');
var path = require('path');
require('http').createServer(function (request, response) {
response.end('<html><body>' +
'<script language="javascript">function foo(a){ return 2 * a }</script>' +
'</body></html>', 'utf8');
}).listen(8123, function () {
@bingomanatee
bingomanatee / gist:7834784
Created December 7, 2013 00:05
test dump
Admins-MacBook-Pro-5:home dedelhart$ node bin/test
Testing files: /Users/dedelhart/Documents/repos/home/test/integration/test-downloading.js, /Users/dedelhart/Documents/repos/home/test/integration/test-pagination.js, /Users/dedelhart/Documents/repos/home/test/integration/test-search.js, /Users/dedelhart/Documents/repos/home/test/integration/test-startup.js, /Users/dedelhart/Documents/repos/home/test/unit/utils/test-drm.js, /Users/dedelhart/Documents/repos/home/test/unit/utils/test-fs-scanner.js, /Users/dedelhart/Documents/repos/home/test/unit/utils/test-model-validation-mixin.js, /Users/dedelhart/Documents/repos/home/test/unit/utils/test-semver.js
Starting Selenium server with command: java "-jar" "/Users/dedelhart/Documents/repos/home/test/selenium-server.jar" "-Dwebdriver.chrome.driver=/Users/dedelhart/Documents/repos/home/nw/node-webkit-v0.8.1-rc1-osx-ia32/chromedriver2_server" ...
started.
downloading
1) "before each" hook
✖ 1 of 20 tests failed:
@bingomanatee
bingomanatee / api.js
Created November 18, 2013 22:20
no limit API
var async = require('async');
var domain = require('domain');
var fs = require('fs-extra');
var os = require('os');
var path = require('path');
var qs = require('querystring');
var url = require('url');
var config = require('../../config/config.js');
var db = require('./db.js');
@bingomanatee
bingomanatee / api.js
Created November 18, 2013 20:51
the token
function getAppDetails(app, cb) {
if (appDetailsQueue.length > 0) {
appDetailsQueue.push({
app: app,
cb: cb
});
} else {
var appId = app.get('appId');
var platform = NodePlatformToServerPlatform[os.platform()];
if (appId && platform) {
@bingomanatee
bingomanatee / sculpteo_model.js
Created November 17, 2013 04:18
latest model
var request = require('request');
var util = require('util');
var crypto = require('crypto');
var fs = require('fs');
var path = require('path');
var _ = require('underscore');
var _hash = _.template(
'version=<%= version %>:' +
'name=<%= name %>:' +
@bingomanatee
bingomanatee / sculpteo_model.js
Created November 16, 2013 17:48
my sculpteo model
var request = require('request');
var util = require('util');
var crypto = require('crypto');
var fs = require('fs');
var path = require('path');
var _ = require('underscore');
var _hash = _.template(
'version=<%= version %>:' +
'email=<%= email %>:' +
@bingomanatee
bingomanatee / gist:7493709
Created November 15, 2013 23:44
log of airspace
Admins-MacBook-Pro-5:home dedelhart$ node bin/airspace
[28887:1115/144452:INFO:CONSOLE(35)] ""LOG: Setting app crash dump dir: /Users/dedelhart/Library/Application Support/Leap Motion (at eval (file:///Users/dedelhart/Documents/repos/home/index.html:59:15))"", source: /Users/dedelhart/Documents/repos/home/app/utils/logging.js (35)
[28887:1115/144452:INFO:CONSOLE(35)] ""LOG: Starting Airspace Home v1.1.0 on node-webkit v0.8.1-rc1 (at eval (file:///Users/dedelhart/Documents/repos/home/index.html:64:15))"", source: /Users/dedelhart/Documents/repos/home/app/utils/logging.js (35)
[28887:1115/144453:INFO:CONSOLE(35)] ""LOG: ~~~ Bootstrap Step: getConfiguration ~~~ (at Array.eval (/Users/dedelhart/Documents/repos/home/app/startup.js:63:15))"", source: /Users/dedelhart/Documents/repos/home/app/utils/logging.js (35)
[28887:1115/144453:INFO:CONSOLE(35)] ""LOG: ### Step: getConfiguration done in 1ms ### (at eval (/Users/dedelhart/Documents/repos/home/app/startup.js:65:17))"", source: /Users/dedelhart/Documents/repos/ho