Skip to content

Instantly share code, notes, and snippets.

View tbell83's full-sized avatar

Tom Bell tbell83

View GitHub Profile
@tbell83
tbell83 / api_gw.py
Created May 26, 2022 21:50
generate terraform apigateway resources from oas3.0 json export
#!/usr/local/bin/python
# this script will export the API gateway config as an Open API 3.0 json blob
# and then create the appropriate terraform resources
import json
from subprocess import run as sp_run
import boto3
profile_name = 'dev'
output_file = 'terraform/regional/api_gw_methods.tf'
@tbell83
tbell83 / fairplay_import.py
Last active February 13, 2020 20:02
import fairplay rds to dynamodb
#!/usr/local/bin/python3
import sys
import datetime
import boto3
import pymysql.cursors
PROPERTY = sys.argv[1]
ENVIRON = sys.argv[2]
#!/bin/bash
set -e
unset AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_SESSION_TOKEN AWS_SECURITY_TOKEN AWS_ACCESS_KEY AWS_SECRET_KEY AWS_DELEGATION_TOKEN
ROLE="${1:-$PROPERTY_CODE-$ENVIRONMENT-jcron}"
ACCOUNT="${2:-$ACCOUNT_ID}"
NAME="${3:-$(echo ${JOB_NAME} | sed 's/ /_/g')-${BUILD_NUMBER}}"
DURATION="${4:-900}"
KST="$(aws sts assume-role --role-arn "arn:aws:iam::${ACCOUNT}:role/$ROLE" \
---------bo-dev----------
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.
The Terraform execution plan has been generated and is shown below.
Resources are shown in alphabetical order for quick scanning. Green resources
will be created (or destroyed and then created if an existing resource
exists), yellow resources are being changed in-place, and red resources
@tbell83
tbell83 / gist:59fdba022d980f2916021dc26cad2566
Last active February 23, 2018 15:50
Jenkins Failing to start
Running from: /usr/share/jenkins/jenkins.war
Sep 12, 2016 2:19:11 PM org.eclipse.jetty.util.log.JavaUtilLog info
INFO: Logging initialized @383ms
Sep 12, 2016 2:19:12 PM winstone.Logger logInternal
INFO: Beginning extraction from war file
Sep 12, 2016 2:19:12 PM org.eclipse.jetty.util.log.JavaUtilLog warn
WARNING: Empty contextPath
Sep 12, 2016 2:19:12 PM org.eclipse.jetty.util.log.JavaUtilLog info
INFO: jetty-9.2.z-SNAPSHOT
Sep 12, 2016 2:19:12 PM org.eclipse.jetty.util.log.JavaUtilLog info
@tbell83
tbell83 / eglibc-2.11.1-0ubuntu7.22_CVE-2015-7547.patch
Created February 23, 2016 13:03
CVE-2015-7547 patch for lucid eglibc_2.11.1-0ubuntu7.21
Index: eglibc-2.11.1/resolv/nss_dns/dns-host.c
===================================================================
--- eglibc-2.11.1.orig/resolv/nss_dns/dns-host.c 2016-02-22 19:37:03.041133126 +0100
+++ eglibc-2.11.1/resolv/nss_dns/dns-host.c 2016-02-22 19:44:47.501119581 +0100
@@ -1025,7 +1025,10 @@
int h_namelen = 0;
if (ancount == 0)
- return NSS_STATUS_NOTFOUND;
+ {
  1. Clothes
  • Warm
    • Shorts
    • T-Shirt
  • Cold
    • Shell
    • Hoodie
    • Long pants/Leggings
  • Wet
  • Bathing Suit

Keybase proof

I hereby claim:

  • I am tbell83 on github.
  • I am tbell (https://keybase.io/tbell) on keybase.
  • I have a public key whose fingerprint is 3F65 FAB3 DD56 3882 35B5 46F4 18C1 AC26 6BCF 773B

To claim this, I am signing this object: