Skip to content

Instantly share code, notes, and snippets.

Perf Testing all the Things!

Sebastian Cohnen tisba

Perf Testing all the Things!
Block or report user

Report or block tisba

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
View gist:224037
class CurlAdapter
class Response
attr_reader :http_response_code
attr_reader :time_total
def initialize(http_response_code, time_total)
@http_response_code = http_response_code
@time_total = time_total
View gist:226086
% this gives me smth like that:
View gist:306696
{~} I brew uninstall gawk
Uninstalling /usr/local/Cellar/gawk/3.1.7...
{~} I brew install spidermonkey -vd
==> Build Environment
PATH: /usr/local/Cellar/autoconf213/2.13/bin:/usr/local/Cellar/readline/6.0/bin:/usr/local/Cellar/autoconf213/2.13/bin:/usr/local/Cellar/readline/6.0/bin:/usr/local/sbin:/usr/local/bin:/Applications/sshfs/bin/:/Users/basti/.gem/bin:/Users/basti/.gem/ruby/1.8/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/texbin:/usr/X11/bin:/Users/basti/.ec2/bin
CFLAGS: -O4 -march=core2 -mmmx -msse4.1 -w -pipe
LDFLAGS: -L/usr/local/Cellar/autoconf213/2.13/lib -L/usr/local/Cellar/readline/6.0/lib -L/usr/local/Cellar/autoconf213/2.13/lib -L/usr/local/Cellar/readline/6.0/lib
CPPFLAGS: -I/usr/local/Cellar/autoconf213/2.13/include -I/usr/local/Cellar/readline/6.0/include -I/usr/local/Cellar/autoconf213/2.13/include -I/usr/local/Cellar/readline/6.0/include
CC: /Developer/usr/bin/llvm-gcc
View CouchDB-changes-listener.rb
require "rubygems"
require "active_support/core_ext"
require "curb"
require "yajl"
class CouchDBChanges
def self.consume(database_url, opts={}, &block)
opts = {:feed => :continuous}.merge(opts)
View backend-rotation-for-riak-client.diff
diff --git a/riak-client/lib/riak/client.rb b/riak-client/lib/riak/client.rb
index 127c2c8..be94f75 100644
--- a/riak-client/lib/riak/client.rb
+++ b/riak-client/lib/riak/client.rb
@@ -35,6 +35,9 @@ module Riak
# @return [Fixnum] The port of the Riak HTTP endpoint
attr_reader :port
+ # @return [Array] of Riak HTTP endpoint hashes each consisting of :host and :port
+ attr_accessor :backends
View gist:489646
diff --git a/bin/ b/bin/
index bc0bdfb..bfb9408 100755
--- a/bin/
+++ b/bin/
@@ -214,7 +214,7 @@ start_pillow () {
touch $PID_FILE
interactive_option="+Bd -noinput"
- command="/usr/bin/erl -sname pillow $interactive_option -boot start_sasl +K true \
+ command="%ERL%/erl -sname pillow $interactive_option -boot start_sasl +K true \
#!/usr/bin/env bash
# where do you want couchdb and its deps to be installed
# Let's determine the correct arcitecture and choose the installer
if [ "`uname -m`" = "x86_64" ]; then
echo "Using 64-bit installer"
View partials.rb
# stolen from
# and made a lot more robust by me
# this implementation uses erb by default. if you want to use any other template mechanism
# then replace `erb` on line 13 and line 17 with `haml` or whatever
module Sinatra::Partials
def partial(template, *args)
template_array = template.to_s.split('/')
template = template_array[0..-2].join('/') + "/_#{template_array[-1]}"
options = args.last.is_a?(Hash) ? args.pop : {}
options.merge!(:layout => false)
#!/usr/bin/env bash
# add partner sources
echo -e "deb lucid partner \n\
deb-src lucid partner" >> /etc/apt/sources.list
# update package list
apt-get update
# read and accept the agreement
#!/usr/bin/env bash
# Build CouchDB 1.0.1 from source using build-couchdb. All needed dependencies
# are also build from source and form a self-contained installation. Specifiy
# COUCHDB_PREFIX to the location where you would like to have everything
# installed to.
# When everything is done, the init.d-script and default settings for CouchDB
# are linked to the right places, the bind address is set to and CouchDB
# will be started, so you can relax!
You can’t perform that action at this time.