Skip to content

Instantly share code, notes, and snippets.


Morgan 'ARR!' Allen morganrallen

  • Allen Industries
  • Oakland
View GitHub Profile
morganrallen / dev.js
Last active Aug 29, 2015
NPM script runner.
View dev.js
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);
View sphero_control.js
var ds = require("dualshock-controller");
var sphero = require("spheron").sphero();
var spheroReady = false;
sphero.on("open", function() {
console.log("sphero ready");
spheroReady = true;
morganrallen / crash.html
Created Nov 7, 2014
Thrust window destruction on display change
View crash.html
webview {
height: 100%;
width: 100%;
webview.nofx {
morganrallen / broke.css
Created Dec 6, 2014
where's it braked?
View broke.css
#dbg-mq {
color: white;
height: 10px;
position: absolute;
right: 10px;
top: 10px;
width: 10px;
z-index: 1000000;
#dbg-mq div {
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE eagle SYSTEM "eagle.dtd">
<eagle version="6.5.0">
<setting alwaysvectorfont="no"/>
<setting verticaltext="up"/>
<grid distance="0.01" unitdist="mm" unit="mm" style="lines" multiple="1" display="yes" altdistance="0.025" altunitdist="inch" altunit="inch"/>
morganrallen / gist:0cd98599cc0f3560bc9f
Created Dec 26, 2014
ESP8266 bootloader GPIO2 output
View gist:0cd98599cc0f3560bc9f
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
View gist:6678b11474574e975096
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> >'
View stpl.js
(function(glob) {
Morgan "ARR!" Allen
supports simple replacements
<li>${var}</li> + { var: "val" } = <li>val</li>
simple replacement with default value
View core.js
(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;
View gist:32f382ba21d7da21be5f
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;