Skip to content

Instantly share code, notes, and snippets.

Tom Davidson tomdavidson

Block or report user

Report or block tomdavidson

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
tomdavidson /
Last active Sep 3, 2019
tf to create children teams after looking up parent ids
## Existing list of teams with members list:
"0" = {
"description" = "No one cared enough to add a description to this team"
"members" = [
"role" = "maintainer"
"username" = "bob"
tomdavidson /
Created Sep 1, 2019
the find file sub mod
variable "filter" {
type = string
default = "*.yaml"
description = "The pattern used to filter files, i.e. '*.yaml'."
variable "search_dir" {
type = string
default = "."
description = "The the directory to search from. Default is '.'."
View gist:26a05aff8b31ee85338ae3b348732dd8
$ terraform plan
2019/09/01 02:45:19 [INFO] Terraform version: 0.12.7
2019/09/01 02:45:19 [INFO] Go runtime version: go1.12.9
2019/09/01 02:45:19 [INFO] CLI args: []string{"/home/tom/.asdf/installs/terraform/0.12.7/bin/terraform", "plan"}
2019/09/01 02:45:19 [DEBUG] Attempting to open CLI config file: /home/tom/.terraformrc
2019/09/01 02:45:19 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2019/09/01 02:45:19 [INFO] CLI command args: []string{"plan"}
2019/09/01 02:45:19 [TRACE] Meta.Backend: no config given or present on disk, so returning nil config
2019/09/01 02:45:19 [TRACE] Meta.Backend: backend has not previously been initialized in this working directory
2019/09/01 02:45:19 [DEBUG] New state was assigned lineage "156a7836-272f-0a26-f953-8f8fc4b37f8b"
tomdavidson /
Created Jul 19, 2015
Installs GNU Command Line Tools & then some.
#!/usr/bin/env bash
# Installs GNU Command Line Tools & then some. Requires homebrew.
# Most are newer and more powerful that than OSX’s but also solves most OS compatibility issues
echo "Installing GNU coreutils and various."
export PATH="$(brew --prefix coreutils)/libexec/gnubin:/usr/local/bin:$PATH"
brew install coreutils
brew install binutils
brew install diffutils
brew install ed --with-default-names
brew install findutils --with-default-names
tomdavidson /
Last active Feb 24, 2018
* Defaults and other config items for the K8S Installer
terraform {
backend "s3" {}
required_version = ">= 0.10.7"
tomdavidson /
Created Jun 17, 2016
wrapper scirpt that assumes aws role
#! /usr/bin/env bash
# Wrapper scirpt that assumes aws role and then runs your script that needs the creds.
# Im not remembering where I got it, but it was at least inspired by another if not verbarium.
View allow-user-iam.json
"Version": "2012-10-17",
"Sid": "AllowAllUsersToListAccounts",
"Effect": "Allow",
tomdavidson /
Last active May 16, 2016
install ssl cert on aws, including creating intermediate for a complete chain
# unofficial bash strict mode
set -euo pipefail
# Run script from dir with both certificate files and the private key
# certificate name on AWS
You can’t perform that action at this time.