Skip to content

Instantly share code, notes, and snippets.

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 <>
// 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];
indygreg / build.html
Created Nov 14, 2011
mozilla-central Programmatically Generated Makefile
View build.html
This file has been truncated, but you can view the full file.
<!DOCTYPE html>
<title>Build System Information</title>
<h1>Build System Data</h1>
<p>This document contains information about the build system.</p>
View patch to browserid wiki
From ccb1c937714766e545753060946d872b57a1f2c7 Mon Sep 17 00:00:00 2001
From: Gregory Szorc <>
Date: Tue, 20 Dec 2011 17:30:23 -0800
Subject: [PATCH] add link to lower-level details
--- | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/ b/
#!env python
from time import clock
from time import strptime
value = '2012-02-28 12:23:35Z'
fmt = '%Y-%m-%d %H:%M:%SZ'
total = 300000
start_time = clock()
indygreg /
Created Jun 17, 2012
Find oldest lines in git repository
# This script parses Git blame's "porcelain" output format and
# ascertains the oldest lines of code seen.
# If you want to perform a custom report, just define your own callback
# function and invoke parse_porcelain() with it.
# The expected input format is slightly modified from raw `git blame
# -p`. Here is an example script for producing input:
indygreg / gist:3085797
Created Jul 10, 2012
View gist:3085797
accessible/src/base/nsAccessiblePivot.cpp:81:1330 [-Wdelete-non-virtual-dtor] delete called on 'nsAccessiblePivot' that has virtual functions but non-virtual destructor
accessible/src/base/nsCoreUtils.cpp:206:24 [-Wtautological-compare] comparison of unsigned expression >= 0 is always true
accessible/src/generic/ARIAGridAccessible.cpp:268:12 [-Wunused-variable] unused variable 'rowCount'
accessible/src/generic/HyperTextAccessible.cpp:1812:8 [-Wunused-variable] unused variable 'isOnlyCaret'
accessible/src/html/HTMLTableAccessible.cpp:769:12 [-Wunused-variable] unused variable 'rv'
accessible/src/html/HTMLTableAccessible.cpp:789:12 [-Wunused-variable] unused variable 'rv'
accessible/src/mac/ [-Wformat-extra-args] data argument not used by format string
accessible/src/mac/ [-Wformat-extra-args] data argument not used by format string
accessible/src/mac/ [-Wformat-extra-args] data argument not used by format string
# Print N integers have M digits.
# Usage: digit-count count
import random
import sys
digit_count = int(sys.argv[1])
indygreg / test.js
Last active Dec 14, 2015
JavaScript testing framework
View test.js
* This is a proof of concept for a JS testing API.
* The eventual goal is to unify and replace the testing API across all of Firefox's
* testing frameworks (xpcshell, mochitest, etc).
* How it Works
* ===========
* Tests are declared in JavaScript files which are loaded by a test harness dependent
* mechanism. Traditionally, the set of files is declared in a manifest somewhere and