Skip to content

Instantly share code, notes, and snippets.

James Halliday substack

Block or report user

Report or block substack

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
View gist:5b551a8cce66ca6d95db
tmp $ torrent 'magnet:?xt=ec4595e48385e42cf9eb3acad02bf3a5928614ab&dn=whatever&tr=udp%3A%2F%2F127.0.0.1%3A9000'
throw new TypeError('must start with number, buffer, array or string');
TypeError: must start with number, buffer, array or string
at fromObject (buffer.js:85:11)
at new Buffer (buffer.js:53:3)
at toBuffer (/home/substack/projects/torrent/node_modules/peer-wire-swarm/index.js:16:42)
at new Swarm (/home/substack/projects/torrent/node_modules/peer-wire-swarm/index.js:143:18)
at Swarm (/home/substack/projects/torrent/node_modules/peer-wire-swarm/index.js:131:39)
View gist:559bd47dac7dd6f93738
$ torrent 'magnet:?xt=urn:btih:ec4595e48385e42cf9eb3acad02bf3a5928614ab&tr=udp%3A%2F%2F127.0.0.1%3A9000'
throw new Error('uneven number of keys and values A')
Error: uneven number of keys and values A
at cb_end (/home/substack/projects/torrent/node_modules/bncode/bncode.js:292:19)
at BdecodeSMachine.parse (/home/substack/projects/torrent/node_modules/bncode/bncode.js:166:17)
at Bdecode.decode (/home/substack/projects/torrent/node_modules/bncode/bncode.js:322:14)
at Object.decode (/home/substack/projects/torrent/node_modules/bncode/bncode.js:444:11)
at /home/substack/projects/torrent/node_modules/torrent-stream/index.js:552:17
View gist:117656da9e8dcb15d8cf
~ $ npm install -g go-ipfs
npm ERR! Linux 3.16.0-4-amd64
npm ERR! argv "/home/substack/prefix/bin/node" "/home/substack/prefix/bin/npm" "install" "-g" "go-ipfs"
npm ERR! node v2.4.0
npm ERR! npm v3.2.2
npm ERR! Error extracting /home/substack/.npm/go-ipfs/0.3.0/package.tgz archive: ENOENT: no such file or directory, open '/home/substack/.npm/go-ipfs/0.3.0/package.tgz'
npm ERR!
npm ERR! If you need help, you may report this error at:
View gist:8699018
substack : ~ $ npm star cookie
npm ERR! Error: forbidden user: substack not authorized to modify cookie
npm ERR! Deleted: versions.0.0.5.readme
npm ERR! Deleted: versions.0.0.6.readme
npm ERR! Deleted: versions.0.0.6.readmeFilename
npm ERR! Deleted: versions.0.1.0.readme
npm ERR! Deleted: versions.0.1.0.readmeFilename
npm ERR! Changed: time.modified "2013-05-28T13:39:37.410Z" -> "2014-01-29T22:53:23.410Z"
npm ERR! Added: users.substack
npm ERR! Added: readmeFilename: cookie
View recruiter_spam.txt
Are you interested in working for one of the most innovative companies in the Bay Area?
Business Journal names my award winning East Bay client cutting-edge and Innovative. You caught my attention and I’d like to speak with you in confidence about a life-changing opportunity.
Ruby on Rails
HTML, CSS, Javascript
substack / compare.txt
Created Feb 8, 2014
upgrades to module-deps in 1.4.1 using [mine](
View compare.txt
$ time browserify -r ./jquery.js:jquery > /dev/null
real 0m2.960s
user 0m2.780s
sys 0m0.208s
substack / gist:8970026
Created Feb 13, 2014
http-browserify npm conflict
View gist:8970026
substack : http-browserify $ git push origin master --tags && npm publish
Enter passphrase for key '/home/substack/.ssh/id_rsa':
Counting objects: 15, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (8/8), done.
Writing objects: 100% (9/9), 1.03 KiB, done.
Total 9 (delta 5), reused 0 (delta 0)
c07ffd6..5d3407e master -> master
* [new tag] 1.3.1 -> 1.3.1
View gist:8968775
substack : insert-module-globals $ npm publish
npm ERR! Error: conflict Document update conflict.: insert-module-globals
npm ERR! at RegClient.<anonymous> (/home/substack/prefix/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:275:14)
npm ERR! at Request.self.callback (/home/substack/prefix/lib/node_modules/npm/node_modules/request/request.js:123:22)
npm ERR! at Request.EventEmitter.emit (events.js:98:17)
npm ERR! at Request.<anonymous> (/home/substack/prefix/lib/node_modules/npm/node_modules/request/request.js:893:14)
npm ERR! at Request.EventEmitter.emit (events.js:117:20)
npm ERR! at IncomingMessage.<anonymous> (/home/substack/prefix/lib/node_modules/npm/node_modules/request/request.js:844:12)
npm ERR! at IncomingMessage.EventEmitter.emit (events.js:117:20)
npm ERR! at _stream_readable.js:910:16
substack / area.js
Last active Aug 29, 2015
oakland street trees per square kilometer by neighborhood
View area.js
// using the data from:
// and (use this as -d)
var fs = require('fs');
var path = require('path');
var select = require('json-select');
var through = require('through');
var minimist = require('minimist');
var areaOf = require('geojson-area').geometry;
var argv = minimist(process.argv.slice(2));
View chirp.js
var baudio = require('baudio');
var melody = [ 1, 2, 1, 3, 1, 0, 6, 2, 8, 2 ];
var b = baudio(function (t) {
var m = melody[Math.floor(t * 2 % melody.length)] * 110;
if (t % 8 > 7) t = Math.sin(t);
t = t % 16;
return (
0.2 * sin(m)
You can’t perform that action at this time.