Skip to content

Instantly share code, notes, and snippets.

Avatar

Josh Padnick josh-padnick

View GitHub Profile
View terraform_debug_log.txt
2016/09/18 12:14:29 [INFO] Terraform version: 0.7.3 0dd7c657d6d60d2e7392b66ae6f74fb84582cab9
2016/09/18 12:14:29 [INFO] CLI args: []string{"/opt/lib/terraform/terraform", "apply"}
2016/09/18 12:14:29 [DEBUG] Detected home directory from env var: /Users/josh
2016/09/18 12:14:29 [DEBUG] Detected home directory from env var: /Users/josh
2016/09/18 12:14:29 [DEBUG] Attempting to open CLI config file: /Users/josh/.terraformrc
2016/09/18 12:14:29 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2016/09/18 12:14:29 [DEBUG] Detected home directory from env var: /Users/josh
2016/09/18 12:14:30 [WARN] Ignoring AWS metadata API endpoint at default location as it doesn't return any instance-id
2016/09/18 12:14:30 [DEBUG] DestroyEdgeInclude: Checking: data.template_file.s3_bucket_policy
2016/09/18 12:14:30 [DEBUG] DestroyEdgeInclude: Checking: aws_s3_bucket.webform
@josh-padnick
josh-padnick / download.sh
Last active Jul 29, 2020
Download a private binary release file from GitHub in bash
View download.sh
#!/usr/bin/env bash
#
# This is an adaptation of code I wrote to download a private binary from GitHub. Such...pain.
# Why can't GitHub just offer a standardized URL you can download a release binary from and attach
# your Github Personal Access Token as a header?
#
# Since this code is an adaptation it hasn't been directly tested, but the code it was adapted from works
# and hopefully you can get the missing piece you're after by looking here.
#
View get-latest-terraform.sh
#!/bin/bash
#
# If there's a new Terraform releases available, delete the current Terraform install and download the new one.
# Must be run from within the directory where terraform binaries should reside
#
LATEST_RELEASE=$(curl https://api.github.com/repos/hashicorp/terraform/releases/latest | jq --raw-output '.tag_name' | cut -c 2-)
if [[ ! -e ${LATEST_RELEASE} ]]; then
echo "Installing Terraform ${LATEST_RELEASE}..."
rm terraform-*
@josh-padnick
josh-padnick / fish-agent.sh
Last active Jun 27, 2020
Run ssh-agent via fish shell
View fish-agent.sh
#!/bin/bash
#
# Convert ssh-agent output to fish shell
#
eval "$(ssh-agent)" >/dev/null
echo "set SSH_AUTH_SOCK \"$SSH_AUTH_SOCK\"; export SSH_AUTH_SOCK"
echo "set SSH_AGENT_PID \"$SSH_AGENT_PID\"; export SSH_AGENT_PID"
@josh-padnick
josh-padnick / go-test.sh
Created Apr 1, 2016
go test all but vendor directory
View go-test.sh
go test $(go list ./... | grep -v /vendor/)
@josh-padnick
josh-padnick / get-latest-terraform.sh
Created Mar 28, 2016
Auto-update to latest version of Terraform
View get-latest-terraform.sh
#!/bin/bash
LATEST_RELEASE=$(curl https://api.github.com/repos/hashicorp/terraform/releases/latest | jq --raw-output '.tag_name' | cut -c 2-)
if [[ ! -e ${LATEST_RELEASE} ]]; then
echo "Installing Terraform ${LATEST_RELEASE}..."
rm terraform-*
rm terraform
wget https://releases.hashicorp.com/terraform/${LATEST_RELEASE}/terraform_${LATEST_RELEASE}_linux_amd64.zip
unzip terraform_${LATEST_RELEASE}_linux_amd64.zip
rm terraform_${LATEST_RELEASE}_linux_amd64.zip
View keybase.md

Keybase proof

I hereby claim:

  • I am josh-padnick on github.
  • I am ohmygoshjosh (https://keybase.io/ohmygoshjosh) on keybase.
  • I have a public key ASCbtKTyzn5uSF7Jp_xL6uF1SUxIqlexOpnujOuZPGVMJQo

To claim this, I am signing this object:

View chrome-policy.json
{
"homepage" : "http://infusionsoft.com"
}
View gist:1b951f7b089a33ad3bce
// Hello human (for machine readable JSON, use the "application/json" Accept header)
{
"compare" : "https://github.com/PhoenixDevOps/phxjug-play-framework-demo/compare/be242da2963b...8f39e4044911",
"previous_successful_build" : {
"build_num" : 22,
"status" : "success",
"build_time_millis" : 796881
},
"build_parameters" : null,
View install-go-cross-compile.sh
#!/bin/bash
# Install goxc
go get github.com/laher/goxc
# May need to do these commands...
goxc -t
# Build the binaries
`GOOS=darwin GOARCH=386 go build -o /home/ubuntu/builds/ec2-snapper/0.1.0/darwin_386/ec2-snapper`
You can’t perform that action at this time.