barinek.com: the official website
Below you'll find a quick stream of consciousness that includes photos, quotes, code snippets, and possibly even a full post. enjoy!
back in the day…
simple comet client
Here’s a simple comet client that I’ve been using to test www.localhash.com
gnip classic sauce
Here’s a snippet of Gnip Classic Java. Sometime in 2009 we were filtering 150,000,000 activities per day, almost 2000 per second, all flowing through the below method.
‘87 land cruiser
farrar and gibbard
pubsubhubbub-rb
Just open sourced a project on GitHub…
The project is a Ruby port of Google’s PubSubHubbub reference implementation.
localhash
Working on LocalHash - a basic example of location based webhooks using the geohash algorithm and is possibly a PubSubHubbub extension candidate. The API was implemented using Sinatra, Redis, Thin, and Nginx.
Gnip Classic
ActiveRecord MySQL Partitions
Check out the below example of how to create partitioned MySQL tables within a Rails Migration. We’ve had a handful of tables that we continually want to partition and a team member wrote the below.Here’s the migration snippet
class AddResultsTable < ActiveRecord::Migration
def self.up
create_partitioned_table :results do |t|
The below creates a results table partitioned by day. The example migration defaults to 4 days back and 4 days forward. We then have a few scripts to manage our partitioned tables.
Here’s the rails source
nginx with thin and monk
The below script is a continuation of my last aws post, however instead of installing Phusion Passenger and Rails, the script installs Thin and Monk. Monk is glue framework for Rack and Sinatra.Here are the links to the software detailed in the script.
As before, the first part of the script removes pre-configured ruby packages and installs ruby and rubygems from scratch and the second part of the script installs nginx with ssl support and then sets up an example monk application.
Here is the full example