Skip to content

Instantly share code, notes, and snippets.

View benbrittain's full-sized avatar
🐘
Focusing

Benjamin Brittain benbrittain

🐘
Focusing
View GitHub Profile
import urllib2
log = urllib2.urlopen('http://geneious.ginkgobioworks.com/log.txt').read().split("\n")
active_users = dict()
for line in log:
line = line.split(' ')
if len(line) > 4:
print(line)
658 let ioservice = Cc['@mozilla.org/network/io-service;1'].getService(Ci.nsIIOService);
659 var aLoadGroup = Cc["@mozilla.org/network/load-group;1"].createInstance(Ci.nsILoadGroup);
660 debug("mon: " + this._monitorURI);
661 debug("chan: " + this._channelURI);
662 let chan = ioservice.newChannel(this._monitorURI, 'UTF-8', null);
663 chan.loadGroup = aLoadGroup;
664 chan.notificationCallbacks = {
665 QueryInterface: XPCOMUtils.generateQI([Ci.nsIHttpPushListener,
666 Ci.nsIStreamListener,
667 Ci.nsRequestObserver]),