Skip to content

Instantly share code, notes, and snippets.

View morganrallen's full-sized avatar

Morgan 'ARR!' Allen morganrallen

  • Allen Industries
  • Oakland
View GitHub Profile
@morganrallen
morganrallen / dev.js
Last active August 29, 2015 13:56
NPM script runner.
var path = require("path");
var spawn = require("child_process").spawn;
var scripts = process.argv.slice(2);
console.log("Running from %s", process.cwd());
scripts.forEach(function(script) {
console.log("[executing] npm run %s", script);
var ds = require("dualshock-controller");
var sphero = require("spheron").sphero();
var spheroReady = false;
sphero.on("open", function() {
console.log("sphero ready");
spheroReady = true;
sphero.setBackLED(0xff);
@morganrallen
morganrallen / crash.html
Created November 7, 2014 19:36
Thrust window destruction on display change
<html>
<head>
<style>
webview {
height: 100%;
width: 100%;
}
webview.nofx {
@morganrallen
morganrallen / broke.css
Created December 6, 2014 08:11
where's it braked?
#dbg-mq {
color: white;
height: 10px;
position: absolute;
right: 10px;
top: 10px;
width: 10px;
z-index: 1000000;
}
#dbg-mq div {
@morganrallen
morganrallen / breakout.br
Last active August 29, 2015 14:11
breakout
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE eagle SYSTEM "eagle.dtd">
<eagle version="6.5.0">
<drawing>
<settings>
<setting alwaysvectorfont="no"/>
<setting verticaltext="up"/>
</settings>
<grid distance="0.01" unitdist="mm" unit="mm" style="lines" multiple="1" display="yes" altdistance="0.025" altunitdist="inch" altunit="inch"/>
<layers>
@morganrallen
morganrallen / gist:0cd98599cc0f3560bc9f
Created December 26, 2014 23:50
ESP8266 bootloader GPIO2 output
ets Jan 8 2013,rst cause:1, boot mode:(3,7)
load 0x40100000, len 24404, room 16
tail 4
chksum 0x5f
load 0x3ffe8000, len 3428, room 4
tail 0
chksum 0x85
load 0x3ffe8d70, len 6624, room 8
tail 8
@morganrallen
morganrallen / gist:6678b11474574e975096
Created January 8, 2015 22:00
runtimejs build error
deps/libcxx/include/type_traits: In substitution of 'template<class _Tp, class ... _Args> typename std::__1::__select_2nd<decltype (std::__1::move((_Tp)((declval<_Args>)()...))), std::__1::integral_constant<bool, true> >::type std::__1::__is_constructible_test(_Tp&&, _Args&& ...) [with _Tp = v8::UniquePersistent<v8::Value>; _Args = {v8::UniquePersistent<v8::Value>&}]':
deps/libcxx/include/type_traits:2066:8: required from 'struct std::__1::__libcpp_is_constructible<false, v8::UniquePersistent<v8::Value>, v8::UniquePersistent<v8::Value>&>'
deps/libcxx/include/type_traits:2117:8: required from 'struct std::__1::__is_constructible_void_check<false, v8::UniquePersistent<v8::Value>, v8::UniquePersistent<v8::Value>&>'
deps/libcxx/include/type_traits:2143:30: required from 'struct std::__1::is_constructible<v8::UniquePersistent<v8::Value>, v8::UniquePersistent<v8::Value>&>'
deps/libcxx/include/type_traits:2358:30: required from 'struct std::__1::is_copy_constructible<v8::UniquePersistent<v8::Value> >'
deps/l
(function(glob) {
/*
stpl
Morgan "ARR!" Allen
morganrallen@gmail.com
supports simple replacements
<li>${var}</li> + { var: "val" } = <li>val</li>
simple replacement with default value
(function(global) {
var config = false,
modules = [];
// setup single public namespace
var skel = global.skel = {
init: function(c) {
// put initial config in the public scope
config = c;
var fs = require("fs");
var ws = fs.createWriteStream("0xbfc40000-0xbffffff0-scaled.log");
var rs = fs.createReadStream("0xbfc40000-0xbffffff0.log");
var line = 0;
function tohex(n) {
var out = n.toString(16);
return out;