Skip to content

Instantly share code, notes, and snippets.

I am excited for the potential opportunity to help Heroku improve their distributed data collection and plan for future growth in the same way that I've done for numerous companies over the course of my career.

Most recently, as a member of the Insights team, I helped build numerous features of our cutting-edge analytics platform, on both the back- and front-end. We developed new tools that allowed customers to query custom event data in real time, and visualize those query results in a number of useful ways. During this time we operated as a full devops team: we handled our own

@zenhob
zenhob / gist:f70bbb802e3e6729a1a6
Created May 31, 2014 22:52
Bulding Go binaries for Raspberry Pi

To build a binary that will run on the Raspberry Pi, you need to have a Go cross compiler and enable it when building the executable.

To build the cross compiler for Linux/ARM (you only need to do this once):

cd /usr/local/go/src
sudo GOOS=linux GOARCH=arm ./make.bash --no-clean

Once you've done that, you can build a binary for Raspberry Pi:

@zenhob
zenhob / generic_api.rb
Created April 4, 2014 03:57
Starter Ruby client for your REST API, based on Faraday
#
# This module is a starter Ruby client for your REST API, based on Faraday:
# https://github.com/lostisland/faraday/
#
# It supports HTTP basic authentication, sending and recieving JSON, and simple error reporting.
# I use this as a basis for building API clients in most of my Ruby projects.
#
# Use it like this:
#
# http = GenericApi.connect('http://localhost:3000/', 'myname', 'secret')
@zenhob
zenhob / keybase.md
Created March 21, 2014 18:58
keybase verification

Keybase proof

I hereby claim:

  • I am zenhob on github.
  • I am zenhob (https://keybase.io/zenhob) on keybase.
  • I have a public key whose fingerprint is E38C 0422 C175 261F 81E2 16DF 9B7B 36D3 3954 B2B8

To claim this, I am signing this object:

@zenhob
zenhob / -
Created February 4, 2014 22:47
#!/bin/sh
#
# Patches and installs Ruby to expose OpenSSL context options, using rbenv.
#
# Based on http://philippe.bourgau.net/how-to-install-a-patched-ruby-interpreter-wit/
#
VERSION=2.0.0-p247
PATCH_URL="https://bugs.ruby-lang.org/attachments/download/4210/0001-Expose-the-SSLContext-options-attribute-in-Net-HTTP.patch"
PATCH_NAME=ssloptions
@zenhob
zenhob / -
Created February 4, 2014 22:13
{
"given_cipher_suites": [
"TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384",
"TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384",
"TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384",
"TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384",
"TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA",
"TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA",
"TLS_SRP_SHA_DSS_WITH_AES_256_CBC_SHA",
"TLS_SRP_SHA_RSA_WITH_AES_256_CBC_SHA",
@zenhob
zenhob / -
Created February 4, 2014 20:39
{
"given_cipher_suites": [
"TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384",
"TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384",
"TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384",
"TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384",
"TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA",
"TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA",
"TLS_SRP_SHA_DSS_WITH_AES_256_CBC_SHA",
"TLS_SRP_SHA_RSA_WITH_AES_256_CBC_SHA",
@zenhob
zenhob / -
Created February 4, 2014 20:38
{
"given_cipher_suites": [
"TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384",
"TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384",
"TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384",
"TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384",
"TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA",
"TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA",
"TLS_SRP_SHA_DSS_WITH_AES_256_CBC_SHA",
"TLS_SRP_SHA_RSA_WITH_AES_256_CBC_SHA",
@zenhob
zenhob / gist:5146625
Created March 12, 2013 20:18
JQuery-alike JSON client API. Includes promises and cross-browser compatibility.
define('json-client', function() {
var JSON_KEY;
var API_BASE = '';
var validResponses = {
200: true,
201: true,
204: true

AccessibleFor: key-based hash sanitizer for Ruby

This is a simple mass-assignment security module loosely based on [ActiveModel::MassAssignmentSecurity][1]. It attempts to steal the good ideas and some of the API while being compatible with Rails 2.3-based applications.

Only attr_accessible (or its equivalent, keep reading) is implemented, because attr_protected is just a bad ActiveRecord API that hung around for some reason, and we don't want it stinking up the place.