Skip to content

Instantly share code, notes, and snippets.

Avatar
🔰
( ͡ᵔ ͜ʖ ͡ᵔ )

Max Ogden maxogden

🔰
( ͡ᵔ ͜ʖ ͡ᵔ )
View GitHub Profile
@maxogden
maxogden / build.sh
Created Aug 27, 2015
compiling chromium on ubuntu notes
View build.sh
# I used a computer with 8 cores, 16gb ram and 8gb SSD swap
# Assumes user is named admin and you clone stuff to /home/admin
sudo apt-get update
sudo apt-get install -y build-essential git
vim /etc/apt/sources.list
# uncomment multiverse lines, save
sudo apt-get update
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
# add to .bash_profile:
# export PATH=$PATH:/home/admin/depot_tools
@maxogden
maxogden / index.js
Last active Aug 29, 2015
requirebin sketch
View index.js
var url = require('url')
var dtable = require('data-table')
var bxhr = require('binary-xhr')
var bcsv = require('binary-csv')
var concat = require('concat-stream')
var Buffer = require('buffer').Buffer
var insertCss = require('insert-css')
insertCss(dtable.css)
@maxogden
maxogden / hanging.txt
Created Feb 10, 2014
hanging git push
View hanging.txt
> test-git@0.0.0 start /root/testcase/8548881
> node index.js
push to http://localhost:5000/some_repo_name
DEBUG spawning git-receive-pack --stateless-rpc --advertise-refs /root/testcase/8548881/repos/foobar.git
DEBUG: http response write [ '001f# service=git-receive-pack\n0000' ]
DEBUG: http response write [ '00880000000000000000000000000000000000000000 capabilities^{}\u0000 report-status delete-refs side-band-64k quiet ofs-delta agent=git/1.8.1.2\n0000' ]
DEBUG git-receive-pack --stateless-rpc --advertise-refs /root/testcase/8548881/repos/foobar.git output: [ '00880000000000000000000000000000000000000000 capabilities^{}\u0000 report-status delete-refs side-band-64k quiet ofs-delta agent=git/1.8.1.2\n0000' ]
DEBUG spawning git-receive-pack --stateless-rpc /root/testcase/8548881/repos/foobar.git
DEBUG: http request write [ '00a50000000000000000000000000000000000000000 d866617994c48f075615416bd282e73214882c96 refs/heads/master\u0000 report-status side-band-64k agent=git/1.8.3.4.(Apple.Git-47)0000PACK\u0000\u0
@maxogden
maxogden / index.js
Created Feb 11, 2014
dat cors test
View index.js
var request = require('browser-request')
request('http://test.local:6461', function(err, resp, body) {
console.log('root', err, resp, body)
})
request('http://test.local:6461/_package', function(err, resp, body) {
console.log('package', err, resp, body)
})
View gist:8939473
stream._write = function (buf, enc, next) {
// dont send terminate signal
console.log('WRITE', [buf, buf.toString()])
if (buf.length === 4 && buf[buf.length-1] === 48
&& buf[buf.length-2] === 48 && buf[buf.length-3] === 48
&& buf[buf.length-4] === 48) stream.needsPktFlush = true
else backend.push(buf)
if (backend._ready) next()
else stream._next = next;
@maxogden
maxogden / index.js
Created Feb 16, 2014
requirebin sketch
View index.js
var master = new (webkitAudioContext || AudioContext)
var jsynth = require('jsynth')
var url = require('url')
var bxhr = require('binary-xhr')
var bcsv = require('binary-csv')
var concat = require('concat-stream')
var Buffer = require('buffer').Buffer
var qs = url.parse(window.location.href, true).query
var csvUrl = qs.csv || 'https://raw.github.com/felixge/faster-than-c/master/figures/mysql-libs/results/mysql-libmysqlclient-1.5.1.tsv'
@maxogden
maxogden / index.js
Created Feb 18, 2014
requirebin sketch
View index.js
require('aristotle')
@maxogden
maxogden / readme.md
Created Feb 21, 2014
global module scope
View readme.md
$ coffee
-bash: coffee: command not found
Macintosh-4:~ max$ npm install coffee-script -g
npm http GET https://registry.npmjs.org/coffee-script
npm http 304 https://registry.npmjs.org/coffee-script
npm http GET https://registry.npmjs.org/mkdirp
npm http 304 https://registry.npmjs.org/mkdirp
/usr/local/bin/coffee -> /usr/local/lib/node_modules/coffee-script/bin/coffee
/usr/local/bin/cake -> /usr/local/lib/node_modules/coffee-script/bin/cake
@maxogden
maxogden / index.js
Created Mar 4, 2014
requirebin sketch
View index.js
require('console-log').show(true)
console.log('hello!')
@maxogden
maxogden / ms-logger.js
Created Mar 4, 2014
partial tap output w/ how long each test took
View ms-logger.js
var time = +Date.now()
var testId = 0
console.log('TAP version 13')
tape.createStream({ objectMode: true }).on('data', function (row) {
if (row.type === 'test') {
console.log('# ' + row.name)
}
if (row.type === 'assert') {
testId++
You can’t perform that action at this time.