Skip to content

Instantly share code, notes, and snippets.

View namehash.go
package ens
import (
func Namehash(name string) common.Hash {
ryandotsmith / main.go
Created Jan 15, 2015
Sending an OP_RETURN Bitcoin Transaction with Go using Chain's Bitcoin API
View main.go
package main
import (
ryandotsmith / agg.sql
Created Jan 23, 2013
Postgres array concatenation aggregate function.
View agg.sql
CREATE AGGREGATE array_accum (anyarray)
sfunc = array_cat,
stype = anyarray,
initcond = '{}'
ryandotsmith / op_return.rb
Created Feb 9, 2015 OP_RETRURN Transaction - Create Bitcoin OP_RETURN Transactions in Ruby
View op_return.rb
require 'bitcoin'
require 'chain'
Chain.block_chain = 'testnet3' = :testnet3
include Bitcoin::Builder
key = Bitcoin::Key.from_base58("cVVBKRBMoPLJSSMW7cM3hji7VmXz1zJWX3DypcjPcWpRBMEu2xF7")
builder =

A Backbone.js demo app (Sinatra Backend)

Oct 16 2010


  • 04/10/2011 - Updated application.js and application.rb thanks to @rebo's comments

In this article, I will walk through some simple steps to get a [demo app][2] up and running with [Backbone.js][3] and [Sinatra][4] on [Heroku][5].


Event Buffering

Eventually platforms outgrow the single-source-tree model and become distributed systems. A common pattern in these distributed systems is distributed composition via event buffering. Here we motivate and describe this event buffering pattern.

The Problem


The Worker Pattern


  • Introduction
  • Definition
  • Examples
  • Links


ryandotsmith /
Last active Sep 27, 2018
Hack Reactor Talk

Tales From a Heroku User

Here are some things I have learned along the way.

Last Updated: 2013-02-08

Original Audience: Hack Reactor


ryandotsmith / policy.json
Created Sep 20, 2013
AWS IAM Read Only
View policy.json
"Version": "2012-10-17",
"Statement": [
"Action": [

Process Partitioning

The Problem

When working with large, high volume, low latency systems, it is often the case that processing data sequentially becomes detrimental to the system's health. If we only allow 1 process to work on our data we run into several challenges:

  • Our process may fall behind resulting in a situation which it is impossible for our process to catch up.
  • Our singleton process could crash and leave our system in a degraded state.
  • The average latency of data processing could be dramatically affected by outlying cases.