Skip to content

Instantly share code, notes, and snippets.

📈
bigger on the inside

C J Silverio ceejbot

📈
bigger on the inside
Block or report user

Report or block ceejbot

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ceejbot
ceejbot / beam.js
Created Feb 23, 2012
ICanHaz rewritten to use mote.js & ender/jquery/zepto.
View beam.js
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 = {
@ceejbot
ceejbot / majordomo.js
Created Jun 9, 2012
ZeroMQ router/dealer example for node.js
View majordomo.js
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);
@ceejbot
ceejbot / responder.js
Created Jun 9, 2012
ZeroMQ rep socket example for node.js
View responder.js
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++)
@ceejbot
ceejbot / requester.js
Created Jun 9, 2012
ZeroMQ req socket example for node.js
View requester.js
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';
@ceejbot
ceejbot / 1_problem.js
Created Aug 24, 2012
An error-handling pattern for node.js
View 1_problem.js
function functionThatMightThrow(input)
{
return JSON.parse(input);
}
function putTogetherSomeData(input, callback)
{
var result = {};
redis.get(input, function(err, reply)
@ceejbot
ceejbot / secure-client.js
Last active Dec 10, 2015
A node https server/client pair that uses client certs to authorize clients.
View secure-client.js
#!/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'),
View gist:5678796
team-cave-newt:master* λ node camera.js
640
368
7.982560051722453e+83
640
368
2.516806656184071e+253
640
368
2.529804685642898e+79
@ceejbot
ceejbot / stashwoes.md
Last active Mar 14, 2019
A summary of things I miss about Github when I use Stash.
View stashwoes.md

What I miss about github

See this Cloudup stream for visual references.

The short answer is that I miss everything. There is no comparing the two projects. Stash's feature set is a shadow of Github's.

What a project looks like on Github:

What a project looks like on Github

@ceejbot
ceejbot / nodebots_todo.md
Last active Dec 23, 2015
Things to do for nodebots day
View nodebots_todo.md
  1. Party rentals from here: ASERentals. Arrange on Monday if possible.
  2. Bottled water in quantity.
  3. Canned soda in quantity.
  4. Large plastic buckets for drinks.
  5. DAY BEFORE: Mail to all attendees with directions from 101 & suggestions for what to bring.
  6. DAY OF: Ice in bags. Maybe beer.
  7. DAY OF: Bring all your toys.
  8. DAY OF: Taco order mid-morning.
View keybase.md

Keybase proof

I hereby claim:

  • I am ceejbot on github.
  • I am ceej (https://keybase.io/ceej) on keybase.
  • I have a public key whose fingerprint is E89C 39C9 4390 77BF 93CA 0B83 C50C CAB0 EC67 50DF

To claim this, I am signing this object:

You can’t perform that action at this time.