Skip to content

Instantly share code, notes, and snippets.

Harlow Ward harlow

Block or report user

Report or block harlow

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@harlow
harlow / golang_job_queue.md
Last active Aug 18, 2019
Job queues in Golang
View golang_job_queue.md
@harlow
harlow / frc.md
Last active Aug 14, 2019
Eng Management
View frc.md

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 / get_set.go
Created Aug 4, 2014
Get and set values of a Struct using reflection in Go Lang
View get_set.go
type MyStruct struct {
N int
}
n := MyStruct{ 1 }
// get
immutable := reflect.ValueOf(n)
val := immutable.FieldByName("N").Int()
fmt.Printf("N=%d\n", val) // prints 1
@harlow
harlow / recipe.md
Last active Aug 7, 2019
Drink Positive
View recipe.md

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 / cache.go
Created Aug 24, 2016
Golang cache map
View cache.go
package cache
import (
"crypto/sha256"
"encoding/json"
"fmt"
"os"
"sync"
"time"
)
@harlow
harlow / worker-pool.go
Last active Apr 24, 2019
Worker pool to control concurrency and collect results
View worker-pool.go
package main
import (
"fmt"
"sync"
"time"
)
const concurrency = 3
@harlow
harlow / first-name-synonyms.csv
Last active Mar 12, 2019
First name synonyms for Elasticsearch synonym filter
View first-name-synonyms.csv
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 4 columns, instead of 5. in line 1.
aaron,erin,ron,ronnie
abel,ab,abe,eb,ebbie
abiel,ab
abigail,abby,gail,gail,nabby
abner,ab
abraham,ab,abe
abram,ab
adaline,ada,addy,delia,dell,lena
adelaide,addy,adele,dell,della,heidi
adeline,ada,addy,delia,dell,lena
@harlow
harlow / user.rb
Last active Dec 21, 2018
Extract a validator in Rails. Zip code validation.
View user.rb
# app/models/user.rb
class User < ActiveRecord::Base
validates :zip_code, presence: true, zip_code: true
end
@harlow
harlow / README.md
Last active May 18, 2018
DynamoDB on Travis-CI
View README.md

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 / streams_to_firehose.go
Last active May 9, 2018
Golang lambda function to send Streams data to Firehose
View streams_to_firehose.go
package main
import (
"github.com/apex/go-apex"
"github.com/apex/go-apex/kinesis"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/firehose"
)
You can’t perform that action at this time.