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
team-cave-newt:master* λ node camera.js | |
640 | |
368 | |
7.982560051722453e+83 | |
640 | |
368 | |
2.516806656184071e+253 | |
640 | |
368 | |
2.529804685642898e+79 |
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
#!/usr/bin/env node | |
var fs = require('fs'), | |
https = require('https'); | |
// We pass our client key & cert to the http agent, | |
// which we then use to make the request. | |
var agentOptions = { | |
key: fs.readFileSync('client.key'), | |
cert: fs.readFileSync('client.crt'), |
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
function functionThatMightThrow(input) | |
{ | |
return JSON.parse(input); | |
} | |
function putTogetherSomeData(input, callback) | |
{ | |
var result = {}; | |
redis.get(input, function(err, reply) |
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 zmq = require('zmq'); | |
var requester = zmq.socket('req'); | |
requester.on('message', function(data) | |
{ | |
console.log('got messsage: ' + data.toString('utf8')); | |
}); | |
var endpoint = 'tcp://127.0.0.1:3009'; |
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 zmq = require('zmq'); | |
var responder = zmq.socket('rep'); | |
responder.on('message', function(payload) | |
{ | |
var data = JSON.parse(payload); | |
var response = {}; | |
var keys = Object.keys(data); | |
for (var i = 0; i < keys.length; i++) |
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 zmq = require('zmq'); | |
function Majordomo(options) | |
{ | |
this.requests = zmq.socket('router'); | |
this.requests.identity = 'majordomo:incoming:' + process.pid; | |
this.responders = zmq.socket('dealer'); | |
this.responders.identity = 'majordomo:outgoing:' + process.pid; | |
if (options) | |
this.configure(options); |
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 beam = ((typeof module !== 'undefined') && module.exports) || {}; | |
(function(exports) | |
{ | |
function trim(input) | |
{ | |
if (''.trim) return input.trim(); | |
else return input.replace(/^\s+/, '').replace(/\s+$/, ''); | |
} | |
beam = { |
NewerOlder