Skip to content

Instantly share code, notes, and snippets.

View cellvia's full-sized avatar

Brandon Selway cellvia

View GitHub Profile
@cellvia
cellvia / gist:2c5d60461139cdb96cc9f907abd99833
Last active December 13, 2017 15:49
retry loop grabbing a folder of files via adb
var Promise = require('bluebird')
var fs = require('fs')
var adb = require('adbkit')
var client = adb.createClient()
const pathToFiles = '/sdcard/Download';
const loop = () => {
client.listDevices()
.then(function(devices) {
@cellvia
cellvia / index.js
Created June 30, 2016 15:59
requirebin sketch
var traverse = require('traverse')
class Hello {
constructor(){
console.log("hello");
}
}
class Hello2 extends Hello{
constructor(){
@cellvia
cellvia / index.js
Created June 30, 2016 15:59
requirebin sketch
class Hello {
constructor(){
console.log("hello");
}
}
class Hello2 extends Hello{
constructor(){
super();
console.log("hello2");
var Redis = require('redis-stream');
var client = new Redis( settings.redisPort, settings.redisHost );
var keystream = client.stream('keys')
keystream.write('fogbugz:ticket:*');
keystream.on("end", function(){
console.log("end"); /*returns all the keys properly, but NEVER ENDS*/
//arguments = [pipe1, pipe2, pipe3];
var streams = [].slice.call(arguments);
streams.map(
function(stream){
return
Object.keys(stream).reduce(function(s,k) { s[k] = stream[k]; return s }, Object.create(stream.__proto__));
}
);
@cellvia
cellvia / gist:3955771
Created October 25, 2012 22:08
stream problem Error: Unexpected "\u001f" at position 0 in state START
stream.js:81
throw er; // Unhandled stream error in pipe.
^
Error: Unexpected "\u001f" at position 0 in state START
at Parser.proto.charError (C:\node\work\crimson\Dev\node_modules\JSONStream\
node_modules\jsonparse\jsonparse.js:81:16)
at Parser.proto.write (C:\node\work\crimson\Dev\node_modules\JSONStream\node
_modules\jsonparse\jsonparse.js:111:23)
at Stream.exports.parse.stream.write (C:\node\work\crimson\Dev\node_modules\
JSONStream\index.js:83:12)
var http = require('http');
var cicada = require('cicada');
var ci = cicada('./gittest');
ci.on('commit', function (commit) {
console.log("commit");
/* commit.run('test').on('exit', function (code) {
var status = code === 0 ? 'PASSED' : 'FAILED';
console.log(commit.hash + ' ' + status);
});*/
@cellvia
cellvia / tags: third eye, motivation
Last active August 29, 2015 14:01
~reflections~the "mystery" of the third eye
I'm baffled by the pervasive "mystery" surrounding the beholding of the third eye. It's about as mysterious as the beholding of a ball -- all you need do is simply look at it. Literally. Close your eyes, look up, then look in. If not immediately, remain there for just a few minutes and there you are: colors, images, tunnels, feelings of peace, etc. all right there. And before you suggest I have easy access from my experience with meditation and psychedelics, I can confirm this is nothing a child couldn't do -- I was doing it many years before I even heard the word meditation, and the children in my life find it very easy to have this experience with minimal explanation. It looks to me like the only thing keeping people from accessing such plainly obvious experience is a masochistic lack of openness, laziness, fear, or perhaps never having thought to look there in the first place. To think, all the clamour around this "Great Mystery", in both directions. The idea of ridiculing someone for believing the third e
I love javascript because I feel it reflects the universe in a way... That there is no absolute reality but rather a series of encapsulated experience templates (contexts) wherein consciousness (this) explores itself by consuming and emiting events within these contexts. In short, reality is event-driven with endlessly flexible scope. Its our job to reprogram the templates all the way up the prototype chain.
@cellvia
cellvia / gist:11040963
Last active August 29, 2015 14:00
~résumé~Abstract
  • BS in Electronic MediaTowson University, Magna Cum Laude
  • 8+ years experienceWeb programming / motion graphics
  • Dedicated contributorJavascript / Node.js open-source ecosystem

A lifelong programming hobbyist, meta-analyst, and self-styled minimalist who finds beauty in doing the most with the least;

Always searching for underlying logic behind systems in order to extend their function beyond standard capacity;

Enthusiast of language: from the musical to the scientific, from computer to spoken, all provide insight to the process of creation and meaning;