Skip to content

Instantly share code, notes, and snippets.

View benhamill's full-sized avatar
💖

Ben Hamill benhamill

💖
View GitHub Profile
1) test monitors existing entries (KV.RegistryTest)
test/kv/registry_test.exs:65
No message matching {:exit, "shopping", ^bucket} after 100ms. Process mailbox:
{:create, "shopping", #PID<0.151.0>}
stacktrace:
test/kv/registry_test.exs:78
[Fri Dec 12 08:33:20 2008] [error] [client 66.68.49.147] FastCGI: incomplete headers (0 bytes) received from server "/home/hamillbd/apps/garbled/current/public/dispatch.fcgi"
[Fri Dec 12 08:34:30 2008] [error] [client 66.68.49.147] FastCGI: comm with (dynamic) server "/home/hamillbd/apps/garbled/current/public/dispatch.fcgi" aborted: (first read) idle timeout (60 sec)
[Fri Dec 12 08:34:30 2008] [error] [client 66.68.49.147] FastCGI: incomplete headers (0 bytes) received from server "/home/hamillbd/apps/garbled/current/public/dispatch.fcgi"
[Fri Dec 12 16:07:08 2008] [error] [client 24.174.19.86] FastCGI: comm with (dynamic) server "/home/hamillbd/apps/garbled/current/public/dispatch.fcgi" aborted: (first read) idle timeout (60 sec)
[Fri Dec 12 16:07:08 2008] [error] [client 24.174.19.86] FastCGI: incomplete headers (0 bytes) received from server "/home/hamillbd/apps/garbled/current/public/dispatch.fcgi"
[Fri Dec 12 16:31:48 2008] [error] [client 74.1.190.146] FastCGI: comm with (dynamic) server "/home/ha
require 'rubygems'
require 'twitter'
class Reply
attr_accessor :text, :author, :in_reply_to, :time, :atreply
def initialize status_id
status = Twitter::Client.new.status :get, status_id
self.text = status.text
@benhamill
benhamill / chapel_treasure_map_strategy.rb
Created October 21, 2010 23:31
Don't hate it, hate the game.
require 'player'
@games_over_100 = 0
@games_array = []
def run
p = Player.new
@p = p
tm_count = 0
#! /bin/bash
function git_prompt {
branch=$(__git_ps1)
if [ -n $branch ]; then
# color=$(status_color)
echo " "$branch
fi
}
#! /bin/bash
RED="\[\033[0;31m\]"
YELLOW="\[\033[1;33m\]"
GREEN="\[\033[1;32m\]"
BLUE="\[\033[1;34m\]"
DARK_GREY="\[\033[0;30m\]"
LIGHT_GREY="\[\033[0;37m\]"
NORMAL="\[\033[0m\]"
#! /bin/bash
RED="\[\033[0;31m\]"
YELLOW="\[\033[1;33m\]"
GREEN="\[\033[1;32m\]"
BLUE="\[\033[1;34m\]"
DARK_GREY="\[\033[0;30m\]"
LIGHT_GREY="\[\033[0;37m\]"
NORMAL="\[\033[0m\]"
def link_to url, text, options={}
valid_options = [:class, :id]
attributes = %Q{href="#{url}"}
valid_options.each do |option|
attributes = %Q{#{attributes} #{option.to_s}="#{options[option]}"} if options[option]
end
"<a #{attributes}>#{text}</a>"
end
ruby-1.9.2-p136 :002 > "@hoonpark".gsub(/\@([a-z]+)/, $1 * 2)
NoMethodError: undefined method `*' for nil:NilClass
from (irb):2
from /home/ben/.rvm/rubies/ruby-1.9.2-p136/bin/irb:16:in `<main>'
Failures:
1) bundle install with gem sources when cached and locked ignores cached gems for the wrong platform
Failure/Error: out.should == "1.0.0 RUBY"
expected: "1.0.0 RUBY"
got: "1.0.0 x86-linux" (using ==)
# ./spec/support/helpers.rb:223:in `simulate_platform'