This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Process.h> | |
void setup() { | |
Bridge.begin(); | |
Serial.begin(9600); | |
while (!Serial) | |
; | |
Serial.println("Invoking patch script on Yun."); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Require modules | |
var Firebase = require("firebase"); | |
var five = require("johnny-five"); | |
// Create a new instance of Firebase db | |
var firebaseRef = new Firebase( | |
// Fictional URL: replace this with your own from firebase | |
"https://burning-limbo-666.firebaseio.com/colors" | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This version cannot protect its internal | |
// data from external tampering. | |
function Sampler(expect) { | |
this.values = new Array(); | |
this.expect = expect; | |
} | |
Sampler.prototype.add = function(value) { | |
var length = this.values.length; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require("es6-shim"); | |
var priv = new Map(); | |
// * (P)roportional | |
// * (I)ntegral | |
// * (D)erivative | |
function PID(opts) { | |
var state = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// npm install gaze moment minimist | |
var gaze = require("gaze"); | |
var exec = require("child_process").exec; | |
var moment = require("moment"); | |
var argv = require("minimist")(process.argv.slice(2)); | |
var address = argv.i || "192.168.2.2"; | |
var path = argv.p || ""; | |
var blacklist = ["foo.js"]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var prompt = require("prompt"); | |
var serialport = require("serialport"); | |
var five = require("johnny-five"); | |
prompt.start(); | |
serialport.list(function(err, ports) { | |
var bts = btPorts(ports); | |
console.log("Select a port: "); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Imp = require("imp-io"); | |
var five = require("johnny-five"); | |
var Sumobot = require("sumobot")(five); | |
var board = new five.Board({ | |
io: new Imp({ | |
agent: "agent id" | |
}) | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(1) node_modules/aws-sdk/lib/util.js, L609 | |
Object.defineProperty(err, 'name', {writable: true, enumerable: false}); | |
(2) node_modules/aws-sdk/lib/util.js, L676 | |
enumerable: false, writable: true, configurable: true }); | |
(3) node_modules/bluebird/js/browser/bluebird.js, L729 | |
enumerable: false, | |
(4) node_modules/bluebird/js/browser/bluebird.js, L5156 |