Skip to content

Instantly share code, notes, and snippets.

@indygreg
indygreg / README.rst
Last active Aug 29, 2015
Firefox source repository metrics
View README.rst
@indygreg
indygreg / OS X .app sizes in KB
Created May 30, 2014
Firefox install sizes by release
View OS X .app sizes in KB
25848 Firefox 1.0.app
25540 Firefox 1.0.8.app
47632 Firefox 1.5.0.12.app
51392 Firefox 2.0.app
48876 Firefox 2.0.0.20.app
46612 Firefox 3.0.app
46592 Firefox 3.0.18.app
51912 Firefox 3.5.app
51864 Firefox 3.5.9.app
54012 Firefox 3.6.9.app
@indygreg
indygreg / gist:6b2ce94a0faa60448ef4
Created May 8, 2015
git server process overload
View gist:6b2ce94a0faa60448ef4
root 15909 0.0 0.0 177536 4028 ? Ss May07 0:11 /usr/sbin/httpd
apache 10651 0.0 0.0 183644 9280 ? S May07 0:06 \_ /usr/sbin/httpd
2351 14050 0.0 0.0 38868 5716 ? S May07 0:00 | \_ /usr/bin/perl /usr/share/gitolite3/gitolite-shell
2351 15821 0.0 0.0 18364 1048 ? S May07 0:00 | \_ git http-backend
2351 15869 0.0 0.0 17420 1156 ? S May07 0:00 | \_ git-http-backend
2351 16007 0.0 0.0 18364 1052 ? S May07 0:00 | \_ git upload-pack --stateless-rpc .
2351 16093 0.0 0.0 1219344 3376 ? S May07 0:06 | \_ git-upload-pack --stateless-rpc .
2351 16264 0.4 8.7 9085004 5392312 ? S May07 1:34 | \_ git pack-objects --revs --thin --stdout --delta-base-offset
apache 4841 0.4 0.0 180792 6640 ? S May07 0:16 \_ /usr/sbin/httpd
2351 14882 0.0 0.0 38868 5716 ? S 00:59 0:0
@indygreg
indygreg / gist:95c4fbfec3ef1f1de141
Created May 15, 2015
packfile chain depth for gecko-dev
View gist:95c4fbfec3ef1f1de141
$ time git verify-pack -s objects/pack/pack-f72ba52fb32fecd2c676012d66c71433c657adfd.pack
non delta: 850066 objects
chain length = 1: 430167 objects
chain length = 2: 353206 objects
chain length = 3: 242783 objects
chain length = 4: 201341 objects
chain length = 5: 173916 objects
chain length = 6: 147088 objects
chain length = 7: 128371 objects
chain length = 8: 113223 objects
View gist:0bfa4b83ab2c128a20d7
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
31130 gitolite 20 0 14.2g 10g 3.4g S 1703.3 18.1 148:59.53 git
View gist:c9bd4afada031e72b308
----total-cpu-usage---- -dsk/total- -net/total- ---paging-- ---system--
usr sys idl wai hiq siq| read writ| recv send| in out | int csw
64 32 0 0 0 4| 51M 3044k|2534k 112M| 908k 6916k| 96k 21k
61 34 0 0 0 5| 50M 17M|3287k 115M|3544k 2596k| 101k 23k
68 28 0 0 0 4| 58M 7752k|2997k 114M|2612k 7692k| 99k 24k
64 32 0 0 0 4| 59M 4584k|3097k 114M| 376k 4584k| 102k 22k
59 37 0 0 0 4| 47M 5388k|3485k 134M| 64k 5232k| 121k 25k
61 34 0 0 0 4| 47M 5836k|2340k 94M|2044k 5836k| 83k 20k
69 28 0 0 0 4| 48M 5816k|2698k 113M|1836k 5816k| 98k 24k
66 30 0 0 0 4| 43M 5644k|3191k 114M| 96k 5452k| 106k 26k
View moz-survey-analysis.py
#!/usr/bin/env python2.7
import collections
import csv
import re
import sys
#import plotly.plotly as py
#from plotly.graph_objs import *
from bokeh.charts import Bar, output_file, show, save
@indygreg
indygreg / zeromq_blocking_receive_bug.cpp
Created Nov 28, 2010
ZeroMQ Blocking recv() Bug Reproduce
View zeromq_blocking_receive_bug.cpp
// 0MQ "data ready" + recv() block bug by Gregory Szorc <gregory.szorc@gmail.com>
//
// This file produces a bug where a 0MQ socket says it has a message
// available but the call to recv() blocks. This should not happen.
//
// Reproduce conditions:
//
// Definitely on Linux. Not on Windows
//
// For me, this reproduces on x86_64 Linux most of the time, but not always.
View BeerList.txt
Special/Hard to Find Bottles:
Firestone Walker 14th Anniversary Ale
Firestone Walker Reserve Porter
Unibrou (Trader Joe's) 2009 Vintage Ale
Unibrou (some kind of) Blonde Ale
Dogfish Head Hellhound DIPA x2
Bristol Old No 23 (multiple bottles) (2010 GABF gold medal barleywine winner)
More Regular Bottles:
View strtoll_bench.c
#include <errno.h>
#include <stdio.h>
int main(int argc, const char **argv) {
if (argc != 3) {
printf("Usage: %s <integer> <iterations>\n", argv[0]);
return -1;
}
const char *input = argv[1];