Skip to content

Instantly share code, notes, and snippets.

View chrisconlon-klaviyo's full-sized avatar

Christopher Conlon chrisconlon-klaviyo

  • Klaviyo
  • Boston, MA
View GitHub Profile
@chrisconlon-klaviyo
chrisconlon-klaviyo / hardware-bridge.py
Created August 11, 2019 22:46
A python3 script that can find + connect to an Ardunio and web socket, and relay commands between them.
import argparse
import asyncio
import colored
import serial
from serial.tools import list_ports
import sys
import uuid
import websockets
@chrisconlon-klaviyo
chrisconlon-klaviyo / hardware-sketch.ino
Created August 11, 2019 22:43
A brief, novice Arduino hardware sketch to
#include <Stepper.h>
const int steps_per_revolution = 200;
const int step_pin = 3;
const int direction_pin = 4;
const int end_stop_pin = 5;
const int steps_per_motion = steps_per_revolution / 2;
const int motor_speed = 50;
const int led_pin = 13;
@chrisconlon-klaviyo
chrisconlon-klaviyo / mail_dumpster.tf
Created February 27, 2019 19:32
Sample mail_dumpster terraform
terraform {
backend "s3" {
bucket = "synthetic-loadtest-stacks"
key = "synthetic-loadtest/mail_dumpster"
region = "us-east-1"
workspace_key_prefix = "terraform-state"
}
}
data "terraform_remote_state" "vpc" {
@chrisconlon-klaviyo
chrisconlon-klaviyo / step_example.py
Created February 27, 2019 18:35
step_example.py
from stack.step import KlaviyoStackTerraformStep
class MailDumpsterStep(KlaviyoStackTerraformStep):
STEP_NAME = 'mail_dumpster'
MODULE_NAME = 'mail_dumpster'
def __init__(self, stack):
self.stack = stack
super(MailDumpsterStep, self).__init__(
add_provider
date_time_between
ipv4
numerify
random_digit_not_null
street_suffix
address
date_time_between_dates
ipv6
opera