Skip to content

Instantly share code, notes, and snippets.

@harlow
harlow / frc.md
Last active August 14, 2019 16:29
Eng Management

Recently, we were fortunate to bring together top CTO talent from inside and outside the First Round Community to share best practices, challenges and insights. Key topics included how to create a great management team, introducing structure to your org, and tools for better technical productivity. Notes from this session are below.

BUILDING STRONG MANAGEMENT

  • It's easy to build a management structure when things are early and small. But don't over-optimize this structure. It will change as you bring people on. For example, don't give out management titles until you have at least four teams.
  • The best tactic is to have everyone start out as an engineer, then hire an engineering director and split the team in half. This is the cell-splitting model -- grow a team then split it into different cells.
  • Don't promote people into management roles too early. It's better to hire a manager than to promote from within the ranks. The latter only causes conflict.
  • Always remember, while someone might be a bril
@harlow
harlow / recipe.md
Last active August 7, 2019 04:09
Drink Positive

Mezcal Bone Crusher

Here is a variation of a Bone Crusher, a drink originally inspired by acclaimed cocktail writer David Wondrich's Bone cocktail made from rye whiskey, lime juice, sugar and a few dashes of Tabasco.

Here, this spicy, earthy, smoky drink was made from Del Maguey's Single Village Mezcal (Minero), El Tesoro Reposado Tequila, demerara sugar simple syrup, lime and Tabasco.

The Breakdown

3 Fresh Limes
@harlow
harlow / README.md
Last active May 18, 2018 21:01
DynamoDB on Travis-CI

DynamoDB on Travis-CI

Leverage docker-compose to boot up the service and set a DYNAMODB_URL as an Env var. As described in the AWS Ruby SDK we can pass in a custom endpoint to the client.

client = Aws::DynamoDB::Client.new(endpoint: ENV['DYNAMODB_URL'])
@harlow
harlow / kinesis.js
Last active April 27, 2018 20:00
Lambda Functions
console.log('Loading function');
exports.handler = function(event, context) {
//console.log('Received event:', JSON.stringify(event, null, 2));
event.Records.forEach(function(record) {
// Kinesis data is base64 encoded so decode here
var payload = new Buffer(record.kinesis.data, 'base64').toString('ascii');
console.log('Decoded payload:', payload);
});
context.succeed("Successfully processed " + event.Records.length + " records.");
@harlow
harlow / checkpoint.go
Created October 17, 2017 00:00
DDB Checkpoint
package checkpoint
import (
"log"
"strconv"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/service/dynamodb"
"github.com/aws/aws-sdk-go/service/dynamodb/dynamodbattribute"
@harlow
harlow / profile.go
Last active March 11, 2017 23:12
Struct w/ return vals from Aboutme API
// if "name" is returned as `[]` in JSON payload the json.Unmarshal func will panic in Golang
// Name struct {
// GivenName string `json:"givenName"`
// FamilyName string `json:"familyName"`
// Formatted string `json:"formatted"`
// } `json:"name"`
type Profile struct {
ID string `json:"id"`
Hash string `json:"hash"`
RequestHash string `json:"requestHash"`
@harlow
harlow / app_launched_event.rb
Last active January 6, 2017 18:35
Ruby based ETL pipeline with Iron.io and Redshift
# lib/transformers/mixpanel/app_launched_event.rb
module Transformers
module Mixpanel
class AppLaunchEvent
def initialize(data)
@data = data
end
def csv_row
CSV.generate_line(ordinal_transformed_data)
class Registration
# Make this model play nice with `form_for`. Gives us validations, initialize, etc
include ActiveModel::Model
# Accessors for the fields we are exposing in the form
attr_accessor :email, :password, :zip
# This is an implementation detail of our authentication (Clearance). It's ultimately going to
# sign this object in and that process expects a user object that has these fields available
delegate :remember_token, :id, to: user
@harlow
harlow / purchase.rb
Last active January 1, 2016 15:09
Example of using Casting Gem.
class Purchase
include ActiveModel::Model
attr_accessor :customer # + other order related fields..
# some validations
def save
if valid?
charge_customer && create_order