Skip to content

Instantly share code, notes, and snippets.

Jehiah Czebotar jehiah

Block or report user

Report or block jehiah

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
@jehiah
jehiah / libevent-1.4.14b-bitly2.patch
Created Jan 28, 2015
Bitly patches for libevent-1.4.14b
View libevent-1.4.14b-bitly2.patch
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
@jehiah
jehiah / run_test.sh
Created Jan 27, 2015
A set of scripts to compare hashing between Go (gomemcache with ketama) and libmemcached (with ketama consistent) from @davemarchevsky
View run_test.sh
#!/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
@jehiah
jehiah / reader.py
Created Aug 23, 2014
Example NSQ Reader
View reader.py
"""
Usage:
./reader.py --nsqd-tcp-address=address:port --topic=topic --channel=channel
"""
import nsq
import tornado.options
def handler(message):
View keybase.md

Keybase proof

I hereby claim:

  • I am jehiah on github.
  • I am jehiah (https://keybase.io/jehiah) on keybase.
  • I have a public key whose fingerprint is 5FA8 C7EF F19D F9BB 8B02 18AA 43CA 3BC5 5BBC 543F

To claim this, I am signing this object:

@jehiah
jehiah / bulk_shorten_links.go
Created Jun 13, 2014
Encode a bulk csv of links against the Bitly API
View bulk_shorten_links.go
View gist:a93ceab1dd4d9c431653
$ sudo svstat /service/clickatron_sortdb-1
/service/clickatron_sortdb-1: up (pid 4235) 87771717 seconds
$ uptime
18:08:07 up 1073 days, 23:49, 1 user, load average: 1.02, 1.18, 1.22
@jehiah
jehiah / hash_file.go
Created May 23, 2014
Utility for hashing the records of a file
View hash_file.go
package main
import (
"crypto/hmac"
"crypto/sha256"
"encoding/csv"
"flag"
"fmt"
"log"
"os"
@jehiah
jehiah / notify.sh
Created Jan 19, 2014
email notify at system boot time
View notify.sh
#!/bin/bash
#
# *************************************************
# chkconfig: 2345 99 99
# description: notify email address on system boot.
# *************************************************
# Installing:
# 1) save as /etc/rc.d/init.d/notify
# 2) set the desired email address in "MAILADD" variable
# 3) chmod a+w /etc/rc.d/init.d/notify
@jehiah
jehiah / check_swap_paging_rate.sh
Created Jan 19, 2014
Nagios Monitor for the rate pages are swapped in/out
View check_swap_paging_rate.sh
#!/bin/bash
# Show the rate of swapping (in number of pages) between executions
OK=0
WARNING=1
CRITICAL=2
UNKNOWN=-1
EXITFLAG=$OK
WARN_THRESHOLD=1
@jehiah
jehiah / check_forkrate.sh
Created Jan 19, 2014
check_forkrate.sh script to monitor system fork rate with nagios
View check_forkrate.sh
#!/bin/bash
# Copyright bitly, Aug 2011
# written by Jehiah Czebotar
DATAFILE="/var/tmp/nagios_check_forkrate.dat"
VALID_INTERVAL=600
OK=0
WARNING=1
CRITICAL=2
You can’t perform that action at this time.