Skip to content

Instantly share code, notes, and snippets.

Dominic Tarr dominictarr

Block or report user

Report or block dominictarr

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
dominictarr / scuttlebutt_muxdemux_test.js
Last active Dec 14, 2015 — forked from mjohnsullivan/scuttlebutt_muxdemux_test.js
fix a few common stream/scuttlebutt gotchas
View scuttlebutt_muxdemux_test.js
var MuxDemux = require('mux-demux');
var net = require('net');
var Model = require('scuttlebutt/model');
var aModel = new Model
var bModel = new Model
//the scuttlebutt's must have 1 stream per connection,
//therefore they must be created inside the server handler.
View fail.js
var browserify = require('./');
var through = require('through');
var stream = through(function(data) {
var self = this;
self.emit('data', data);
var bundle = browserify();
View .gitignore
View data-channel.js
/* WebRTC consist of a few moving pieces
- A signal mechanism for peers
- A signal mechanism to send offers & answers
- A simplified peerConnection function
var uuid = require("node-uuid")
, assert = require("assert")
dominictarr / header.js
Created Nov 7, 2012 — forked from substack/header.js
this script does nothing
View header.js
var convoy = require('convoy-stream');
var split = require('event-stream').split
var through = require('through');
var header = convoy();
var h = header.createStream();
var _header = convoy()

through stream

| write(data)-------->emit('data', data`)|

duplex stream (across a network)

dominictarr / client.js
Created Jul 29, 2011 — forked from fjakobs/index.html
node-http-proxy bug #70
View client.js
var http = require('http')
function log (str) {
console.log('' + str)
http.get({host: 'localhost', port:6666, path: '/xhr'}, function (res) {
res.on('data', log)
res.on('end', log)
View server.js
//npm install http-proxy
var server = require("http").createServer(function(req, res) {
res.writeHead(200, {"content-type": "text/html"});
res.end("<html><body><script src='/'></script>\
var socket = new io.Socket(null, {transports: ['xhr-multipart']});\
dominictarr / test-methods.js
Created Jul 17, 2011 — forked from stagas/test-methods.js
node-http-proxy methods not working
View test-methods.js
var http = require('http')
, httpProxy = require('http-proxy');
httpProxy.createServer(function (req, res, proxy) {
// Put your custom server logic here
proxy.proxyRequest(req, res, {
host: 'localhost',
port: 9000
dominictarr / git-commit-prefixes
Created May 23, 2011 — forked from Marak/git-commit-prefixes
Short list of Git commit prefixes used at Nodejitsu
View git-commit-prefixes
[api]: New apis / changes to apis
[test]: Update test/* files
[dist]: Changes to submodules, version bumps, updates to package.json
[minor]: Small changes
[doc]: Updates to documentation
[ux]: Updates to UX
[fix]: Bug fixes
[bin]: Update binary scripts associated with the project
[merge]: Resolved git merge from upstream or otherwise
[refactor]: Refactor of existing code with no external API changes
You can’t perform that action at this time.