This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as d3 from "d3"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys | |
import csv | |
import tornado.options | |
from collections import defaultdict | |
def run(): | |
data = defaultdict(dict) | |
columns = set() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%define name nsq | |
%define version 0.3.6.alpha | |
%define release 1 | |
%define path usr/local | |
%define __os_install_post %{nil} | |
%define github_account bitly | |
%define github_project nsq | |
%define clone_account bitly | |
%define commit 925f82a0fa7d6abe3652bb31c4834699a8b1c318 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os.path | |
import logging | |
import tornado.ioloop | |
from nsq import Reader as BaseReader | |
from nsq import run | |
class Reader(BaseReader): | |
def __init__(self, *args, **kwargs): | |
max_in_flight = kwargs['max_in_flight'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package nsqutils | |
import ( | |
"sync" | |
"time" | |
nsq "github.com/nsqio/go-nsq" | |
) | |
// Producer is an interface that nsq.Producer fulfills |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
WARN="180" | |
CRITICAL="300" | |
USE_MODIFY_TIME=false # default to use the contents of the file | |
while [ "$1" != "" ]; do | |
param=${1%%=*} | |
value=${1#*=} | |
case $param in |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env python2.7 | |
""" | |
A script to clear out nsq topics and channels. This is particularly useful in dev for when | |
topics naturally backup, or when launching a producer with some time before a consumer exists | |
""" | |
import tornado.options | |
import tornado.httpclient | |
import logging | |
import json | |
import urllib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -urp libevent-1.4.14b-stable/configure libevent-1.4.14b-stable-fix/configure | |
--- libevent-1.4.14b-stable/configure 2010-06-20 09:06:18.000000000 -0400 | |
+++ libevent-1.4.14b-stable-fix/configure 2012-05-09 15:14:09.000000000 -0400 | |
@@ -2988,7 +2988,7 @@ fi | |
# Define the identity of the package. | |
PACKAGE=libevent | |
- VERSION=1.4.14b-stable | |
+ VERSION=1.4.14b-bitly2 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
# Run C test | |
gcc -g -std=c99 -L/bitly/local/lib -I/bitly/local/include -lmemcached -o test_consistent_hashing test_consistent_hashing.c | |
./test_consistent_hashing < testdata.txt > c_hash_results | |
rm -f test_consistent_hashing | |
# Run go test | |
go run test_consistent_hashing.go > go_hash_results |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Usage: | |
./reader.py --nsqd-tcp-address=address:port --topic=topic --channel=channel | |
""" | |
import nsq | |
import tornado.options | |
def handler(message): |