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 events = require('events') | |
,util = require('util') | |
,_ = require('underscore') | |
,http = require('http') | |
function StreamConsumer(options){ | |
events.EventEmitter.call(this); | |
this.reEot = /.+\r\n/gm; | |
this.req = null; |
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 page = require('webpage').create(); | |
page.open('http://twitter.com/ID_AA_Carmack', function (status) { | |
if (status !== 'success') { | |
console.log('Unable to access network'); | |
} else { | |
var hitRockBottom = false; | |
while (!hitRockBottom) { | |
//scroll the page (not sure if this is the best way to do so...) |
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(){ | |
var socket = io.connect('http://localhost:8080'); | |
socket.on('tweet', function(tweet) { | |
$('body').append('<div class="tweet">' + tweet.text + '</div>'); | |
}); | |
}); |
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
061997d DELEGATE ALL THE THINGS | |
092aa231f wait, wrong place | |
09e7fd3 RERECORD ALL THE THINGS!!! | |
0c27fb3 yeah, fix things will ya | |
0f4549133 New ascii art task (\!important stuff) , and a few DAO tweaks (mino... | |
12aa7ef34 LE NONNNNNN LE MADNESS | |
13233e7 Less PHP | |
154c535 Once more, now with feeling and a proper master head | |
184e754 Dear Past-Friday David :Remember the textarea that seemed totally random and misterioys? It was $.ajax... obviously | |
19a8700 MAKE IT BIGGER |
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 graph = {"0": ["1", "2", "3"], "1": ["2"], "2": [], "3": ["4", "6"], "4": [], "5": ["7"], "6": [], "7": []}; | |
// 0 | |
// / | \ | |
// 1--2 3 | |
// | \ | |
// 4 6 | |
// 5--7 | |
function connected_components(graph) { | |
var seen = [], push = Array.prototype.push; |
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 CryptoJS = CryptoJS || function(u, p) { | |
var d = {}, | |
l = d.lib = {}, | |
s = function() {}, | |
t = l.Base = { | |
extend: function(a) { | |
s.prototype = this; | |
var c = new s; | |
a && c.mixIn(a); | |
c.hasOwnProperty("init") || (c.init = function() { |
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
$Hso = New-Object Net.HttpListener | |
$Hso.Prefixes.Add("http://+:8000/") | |
$Hso.Start() | |
While ($Hso.IsListening) { | |
$HC = $Hso.GetContext() | |
$HRes = $HC.Response | |
$HRes.Headers.Add("Content-Type","text/plain") | |
$Buf = [Text.Encoding]::UTF8.GetBytes((GC (Join-Path $Pwd ($HC.Request).RawUrl))) | |
$HRes.ContentLength64 = $Buf.Length | |
$HRes.OutputStream.Write($Buf,0,$Buf.Length) |
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 util = require('util'), | |
http = require('http'), | |
events = require('events'); | |
var Twitter = function(opts) { | |
this.username = opts.username; | |
this.password = opts.password; | |
this.track = opts.track; | |
this.data = ''; | |
}; |
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 python | |
""" | |
Converts Internet Explorer 'capture network traffic' XML to a HAR file. | |
Turns out that XML is just a HAR file anyways, but in XML form. So this | |
just converts it to JSON, and Bob's your uncle. | |
Requires Python 2.7+ and LXML. | |
""" | |
from __future__ import unicode_literals |
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
fabric.SVGText = fabric.util.createClass(fabric.Object, { | |
type :'text-block', | |
text :'', | |
fontSize :14, | |
color :undefined, | |
lineColors :undefined, | |
selectedLine:0, | |
realWidth :0, | |
realHeight :0, |
OlderNewer