Skip to content

Instantly share code, notes, and snippets.

@fzzzy
fzzzy / servo-worker.js
Created October 18, 2011 20:18
use henri's parser from a webworker
importScripts('../dom.js');
importScripts('domstr.js');
// Mock up enough fake stuff so that the parser can load
// This can be removed once using the non-GWT compiled parser
window = {
location: {href: "foo"},
setTimeout: function() {
return Function.prototype.apply(setTimeout, arguments);
index 4a142fa..ad34145 100644
--- a/node/bin/domrepl.js
+++ b/node/bin/domrepl.js
@@ -3,10 +3,11 @@
var vm = require('vm')
, repl = require('repl')
, fs = require('fs')
+ , url = require('url')
+ , http = require('http')
--- a/node/bin/domrepl.js
+++ b/node/bin/domrepl.js
@@ -79,4 +79,11 @@ function date(){
zeropad(d.getMinutes()), '.',
zeropad(d.getSeconds()),
d.getHours() > 12 ? 'pm':'am' ].join('');
-}
\ No newline at end of file
+}
+
@fzzzy
fzzzy / gist:2288903
Created April 3, 2012 02:36
marionette node websocket proxy
// marionette.js
"use strict";
var net = require('net');
function make_connection(cb) {
var sock = new net.Socket(),
in_buffer = "";
@fzzzy
fzzzy / irc.html
Created April 3, 2012 21:48
b2g irc client
<!DOCTYPE html>
<html>
<head><title>Test</title></head>
<style type="text/css">
dd {
margin-left: 0px;
margin-bottom: 1em;
}
@fzzzy
fzzzy / irc.html
Created April 11, 2012 21:14
js irc client
<!DOCTYPE html>
<html>
<head><title>Test</title></head>
<style type="text/css">
dd {
margin-left: 0px;
margin-bottom: 1em;
}
@fzzzy
fzzzy / gist:2839696
Created May 31, 2012 00:05
tcpsocket wip 0.7
diff --git a/b2g/Makefile.in b/b2g/Makefile.in
--- a/b2g/Makefile.in
+++ b/b2g/Makefile.in
@@ -6,10 +6,12 @@
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
@fzzzy
fzzzy / irc.html
Created June 12, 2012 19:07
js irc client again
<!DOCTYPE html>
<html>
<head><title>Test</title></head>
<style type="text/css">
dd {
margin-left: 0px;
margin-bottom: 1em;
}
@fzzzy
fzzzy / wip-0.8.1
Created June 18, 2012 21:15
tcpsocket updated to apply cleanly on head
diff --git a/b2g/Makefile.in b/b2g/Makefile.in
--- a/b2g/Makefile.in
+++ b/b2g/Makefile.in
@@ -6,14 +6,16 @@
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
@fzzzy
fzzzy / wip-0.9.diff
Created June 20, 2012 02:16
tcpsocket reinterpreted through the lens of MultiplexStream.
diff --git a/b2g/Makefile.in b/b2g/Makefile.in
--- a/b2g/Makefile.in
+++ b/b2g/Makefile.in
@@ -6,14 +6,16 @@
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk