Skip to content

Instantly share code, notes, and snippets.

@harlow
harlow / adams-heroku-values.md
Created December 11, 2020 22:14 — forked from adamwiggins/adams-heroku-values.md
My Heroku values

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style

@harlow
harlow / README.md
Last active April 7, 2021 04:51
Nashville Hot Chicken

Nashville Hot Chicken

Prework

Salt and pepper brine the Chicken pieces for 24 hrs

Breading Station

Combine the following until the egg streaks are gone

@harlow
harlow / lambda.tf
Created June 6, 2020 20:45
Terraform for Lambda func that reads Kinesis and writes to DynamoDB
# AWS
provider "aws" {
region = "us-west-2"
profile = "myAWSProfile"
}
# IAM
## IAM Role
resource "aws_iam_role" "iam_for_lambda" {
@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)
@harlow
harlow / worker-pool.go
Last active July 15, 2024 07:55
Worker pool to control concurrency and collect results
package main
import (
"fmt"
"sync"
"time"
)
const concurrency = 3
@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'])
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 / cache.go
Created August 24, 2016 18:23
Golang cache map
package cache
import (
"crypto/sha256"
"encoding/json"
"fmt"
"os"
"sync"
"time"
)