The next morning Rollins came out wearing only a tiny pair of athletic shorts – tattoos and muscles on full display. Freda and Juliana ogled him shamelessly as he made fun of my canvas sneakers and pressured me to come lift weights in his garage. I politely declined. He asked me to make a pot of coffee and, assuming Rollins drank a strong brew, I heavy-handed it to the tune of approximately double-strength. I handed him a cup and he took a sip and immediately spat it in the sink. “You call this COFFEE??” he bellowed. “Pour that shit out and I’ll show you how to brew a MAN’S pot of coffee!!!” His brew was about three times as strong as mine, and it kept me in a manic state of agitation for the entire visit.
This file contains hidden or 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
# EM.run { | |
# iw = ImapWatcher.new(user, pass); | |
# | |
# iw.watch! { | |
# p "sup, yall got new mail" | |
# } | |
# } | |
# | |
require 'rubygems' | |
require 'eventmachine' |
This file contains hidden or 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
var Gossiper = require('gossiper').Gossiper; | |
var seed = new Gossiper(9000, []); | |
seed.start(); | |
var n = 0; | |
var gs = []; | |
var start_time = undefined; | |
var count = 100; | |
for(var i = 9001; i < 9001+count;i++) { |
This file contains hidden or 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
var msgpack = require('msgpack'); | |
var fs = require('fs'); | |
var crypto = require('crypto'); | |
var hash = function(data) { | |
var h = crypto.createHash('md5'); | |
h.update(data); | |
return h.digest('hex'); | |
} | |
var data = fs.readFileSync(process.argv[2]); |
This file contains hidden or 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 --git a/src/msgpack.cc b/src/msgpack.cc | |
index 5374c3b..6bf6c36 100644 | |
--- a/src/msgpack.cc | |
+++ b/src/msgpack.cc | |
@@ -233,8 +233,11 @@ msgpack_to_v8(msgpack_object *mo) { | |
return a; | |
} | |
- case MSGPACK_OBJECT_RAW: | |
- return String::New(mo->via.raw.ptr, mo->via.raw.size); |
This file contains hidden or 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
class SkinnyJeanDb < ActiveRecord::Base | |
self.abstract_class = true | |
end | |
SkinnyJeanDb.establish_connection(:adapter => 'sqlite3', :database => @sqlite_db_path) | |
class Pageview < SkinnyJeanDb; end | |
Pageview.count |
This file contains hidden or 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
begin | |
# try to call SSL::SSLSocket#io. | |
@sock.io.shutdown | |
rescue NoMethodError | |
# @sock is not an SSL::SSLSocket. | |
@sock.shutdown | |
end |
This file contains hidden or 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
# /etc/conf.d/ttserver: config file for /etc/init.d/ttserver | |
# TCP port TokyoTyrant server should listen on | |
TYRANT_PORT="1978" | |
# Location of the TokyoTyrant server database | |
# Also put addional options here, eg, #bnum | |
# See 'ttserver' man page | |
TYRANT_DB="/var/lib/tokyotyrant/tokyotyrant.tcb" |
This file contains hidden or 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
--- source/ext/dl/depend.old 2011-07-25 23:32:16.000000000 +0000 | |
+++ source/ext/dl/depend 2011-07-25 23:32:34.000000000 +0000 | |
@@ -32,15 +32,15 @@ | |
call.func: $(srcdir)/mkcall.rb ./dlconfig.rb | |
@echo "Generating call.func" | |
- @$(RUBY) $(srcdir)/mkcall.rb > $@ | |
+ @$(RUBY) $(srcdir)/mkcall.rb | tee $@ | |
callback.func: $(srcdir)/mkcallback.rb ./dlconfig.rb |
This file contains hidden or 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
require 'atomic' | |
class RateLimit | |
def initialize(ops_per_second, max_bucket_size = ops_per_second) | |
@ops_per_second = ops_per_second | |
@max_bucket_size = max_bucket_size | |
@sec_per_op = 1.0 / @ops_per_second | |
@bucket = Atomic.new(0) | |
@incr_lock = Atomic.new(0) |