Skip to content

Instantly share code, notes, and snippets.

View tvaughan77's full-sized avatar

Tom Vaughan tvaughan77

  • GetUpside
  • Charlottesville, VA
View GitHub Profile
@tvaughan77
tvaughan77 / partner_api_refresh_offers_response.json
Last active September 11, 2018 18:07
Example of offers-by-grade response
{
"isBase64Encoded": false,
"httpStatusCode": 200,
"errors": [],
"upsideCode": 200,
"payload": [
{
"uuid": "53d172c3-8d71-4f6e-bd77-32474a8678bd",
"userUuid": "42a3e42c-9310-4e1b-a89a-ba682c5f15b7",
"siteUuid": "9f694762-737b-4734-8762-19ae2e6dacd2",

Keybase proof

I hereby claim:

  • I am tvaughan77 on github.
  • I am tvaughan77 (https://keybase.io/tvaughan77) on keybase.
  • I have a public key ASDi_nJgjTWVOSYNwham3Xky2yO1-L7zLl8lwrG1W5QP0go

To claim this, I am signing this object:

@tvaughan77
tvaughan77 / shortcuts.sh
Last active June 27, 2018 17:29
runbook shortcuts
function rup {
sudo pip install runbookcli --upgrade
}
function gup {
sudo pip install getupsidecli --upgrade
}
function rgub {
if [ -z ${1+x} ]; then
@tvaughan77
tvaughan77 / terraform.tfvars
Created December 14, 2017 18:39
Using terraform resource in a terragrunt .tfvars file
# Instead of this in a standalone terraform setup:
resource "aws_s3_bucket" "b" {
bucket = "aws-config.terraform.xyz.com"
acl = "private"
versioning {
enabled = true
}
@tvaughan77
tvaughan77 / python_session.log
Created November 21, 2017 16:16
app-mock user service lambda
>>> from pprint import pprint
>>> from upside_core.services import create_public_service
>>> from user_service.client import UserService
>>> client = create_public_service('prod', UserService)
# I got this data structure from Prod Lambda logs (and cleaned it up by removing the "u'" in front of every attribute
>>> request={"cognitoIdentity": "us-east-1:59796783-204d-4fc4-92b8-358d4009667c", "profile": {"lastName": "Vaughan", "rawProfile": {"kind": "plus#person", "oAuthProviderType": "google_web", "displayName": "Tom Vaughan", "name": {"givenName": "Tom", "familyName": "Vaughan"}, "language": "en", "isPlusUser": False, "image": {"url": "https://lh5.googleusercontent.com/-uU_0FFAJXNI/AAAAAAAAAAI/AAAAAAAAAA8/-DoUR-JqSW0/photo.jpg?sz=50", "isDefault": False}, "domain": "upside-services.com", "oauthToken": None, "emails": [{"type": "account", "value": "tom@upside-services.com"}], "etag": "ucaTEV-ZanNH5M3SCxYRM0QRw2Y/1fhULGzJ0Sbz4KUhZC43cfcMQwI", "verified": False, "id": "102842313150044893838", "objectType": "per
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Stmt1441998815000",
"Effect": "Allow",
"Action": [
"ec2:DescribeFlowLogs",
"ec2:DescribeNetworkInterfaces",
"ec2:DescribeRegions",
@tvaughan77
tvaughan77 / Request_Not_Matched
Created October 27, 2016 21:18
WireMock request not matching
17:17:10.025 [qtp1935719908-21 - /api/v1/users] ERROR WireMock - Request was not matched:
{
"url" : "/api/v1/users",
"absoluteUrl" : "http://localhost:8090/api/v1/users",
"method" : "GET",
"clientIp" : "127.0.0.1",
"headers" : {
"Authorization" : "BASIC dG9tOnNlY3JldA==",
"Connection" : "keep-alive",
"User-Agent" : "user-client",
DEBUG [2015-09-24 17:28:33,596] com.washingtonpost.arc.content.ingestion.kafka.IngestionKafkaModule: Providing KafkaConsumerFactory from our IngestionConfiguration
DEBUG [2015-09-24 17:28:33,597] com.washingtonpost.arc.content.ingestion.kafka.IngestionKafkaModule: Providing new StringDecoder
DEBUG [2015-09-24 17:28:33,597] com.washingtonpost.arc.content.ingestion.kafka.IngestionKafkaModule: Providing new StringDecoder
DEBUG [2015-09-24 17:28:33,618] com.washingtonpost.arc.content.ingestion.IngestionModule: IngestionModule providing new ArcStoryApiClient: 'MockArcStoryApiClient with [0] stories'
DEBUG [2015-09-24 17:28:33,618] com.washingtonpost.arc.content.ingestion.IngestionModule: IngestionModule creating new JedisPool: 'null'
DEBUG [2015-09-24 17:28:33,620] com.washingtonpost.arc.content.ingestion.IngestionModule: IngestionModule providing JedisPool: 'com.fiftyonred.mock_jedis.MockJedisPool@7590b28f'
DEBUG [2015-09-24 17:28:33,620] com.washingtonpost.arc.content.ingestion.kafka.IngestionKafkaModule: Provid