Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Mikeal Rogers mikeal

🏠
Working from home
View GitHub Profile
@mikeal
mikeal / streams.md
Created Sep 26, 2011 — forked from isaacs/streams.md
A spec for streams
View streams.md

Status of this Document

This is a proposal. It does not match the code as of writing.

This describes the minimum contract that Stream objects must adhere to in order to properly interoperate with pipes.

Stream Class

The parent class for all stream objects. Implements the pipe

@mikeal
mikeal / LICENSE.txt
Created Sep 18, 2011 — forked from 140bytes/LICENSE.txt
140byt.es -- Click ↑↑ fork ↑↑ to play!
View LICENSE.txt
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
View sio_stress_test.js
var io = require('socket.io-client');
function createPad (c, cb) {
var c = io.connect("http://localhost:9001")
c.on('error', function (e) {console.error(e)})
c.json.send(
{ "component": "pad"
, "type": "CLIENT_READY"
View making-a-put.js
var client = http.createClient(u.port || (u.protocol === "https:" ? 443 : 80), u.hostname);
var request = client.request("PUT", u.pathname, headers);
request.write(what, "utf8");
request.addListener("response", function (response) {
if (response.statusCode !== 200) return cb(new Error(
"Status code " + response.statusCode + " from PUT "+where));
var data = "";
response
.setBodyEncoding("utf8")
.addListener("data", function (chunk) { data += chunk })
View gist:216535
from couchquery import Database
from testbot import create_job
from testbot.client import Client
class TestAgent(Client):
jobtypes = ['xpcshell']
def do_job(self, job):
print job
View gist:178611
try:
import json
except:
import simplejson as json
import urllib
import types
tbox_url = 'http://tinderbox.mozilla.org/showbuilds.cgi?tree=Mobile&json=1&noignore=1'
logroot = "http://tinderbox.mozilla.org/showlog.cgi?log=Mobile/"