Skip to content

Instantly share code, notes, and snippets.

@jwieringa
jwieringa / hashi-install.sh
Created March 15, 2018 21:01
Amazon linux hashicorp install script
#!/bin/bash
# Author: Jason Wieringa
#
# General script for installing Hashicorp tools.
set -e
: ${PRODUCT:?"Set to desired Hashicorp product"}
: ${VERSION:?"Set to desired Hashicorp product version"}
SYSTEM=$(uname | tr '[:upper:]' '[:lower:]')
@jwieringa
jwieringa / trainer.md
Last active January 2, 2018 15:08
Cycling Trainer
@jwieringa
jwieringa / ami_id.sh
Created October 27, 2017 16:19
Find an AMI ID
SOURCE_IMAGE=$(docker run \
-e AWS_DEFAULT_PROFILE=${AWS_DEFAULT_PROFILE} \
-v $HOME/.aws:/root/.aws \
--rm quay.io/coreos/awscli:latest \
aws --region "us-east-1" \
ec2 describe-images \
--filters \
Name=tag:Env,Values=default \
Name=tag:Project,Values=mine \
Name=tag:Role,Values=mine \
@jwieringa
jwieringa / hashicorp-install.sh
Last active January 31, 2018 05:03
PRODUCT=terraform VERSION=0.9.6 hashicorp-install
#!/bin/bash
# Author: Jason Wieringa
#
# General script for installing Hashicorp tools.
set -e
: ${PRODUCT:?"Set to desired Hashicorp product"}
: ${VERSION:?"Set to desired Hashicorp product version"}
SYSTEM=$(uname | tr '[:upper:]' '[:lower:]')
#!/bin/bash
: ${PRODUCT:?"Set to desired Hashicorp product"}
: ${VERSION:?"Set to desired Hashicorp product version"}
: ${ARCH:?"Set to system architecture"}
SYSTEM=$(uname | tr '[:upper:]' '[:lower:]')
curl -sf https://keybase.io/hashicorp/pgp_keys.asc | /bin/gpg --import
mkdir -p /tmp/${PRODUCT}
pushd /tmp/${PRODUCT}
/bin/curl -sfO https://releases.hashicorp.com/${PRODUCT}/${VERSION}/${PRODUCT}_${VERSION}_${SYSTEM}_${ARCH}.zip

Keybase proof

I hereby claim:

  • I am jwieringa on github.
  • I am jwieringa (https://keybase.io/jwieringa) on keybase.
  • I have a public key ASAb_ywmn0rj2FSpD6HmTGkOXfki5k4Wev4kAwguSaMHlAo

To claim this, I am signing this object:

[Unit]
Description=Hashicorp Vault
After=network-online.target
Wants=network-online.target
[Service]
Slice=machine.slice
Restart=always
RestartSec=10
KillMode=mixed
systemd-run --slice=machine rkt run --net=host --dns=host --insecure-options=image docker://registery
docker build -t interactive .
docker push localhost:5000/interactive
systemd-run --slice=machine rkt run --insecure-options=all --net=host --dns=host docker://localhost:5000/interactive:0.0.1
@jwieringa
jwieringa / main_test.go
Last active April 2, 2017 16:29
Learning about subtests in Golang with Parallel execution
// Sequential
// $ go test
// PASS
// ok 7.312s
// Parallel On
// $ go test
// PASS
// ok 0.985s
@jwieringa
jwieringa / .config
Created April 2, 2017 15:36 — forked from brianredbeard/.config
buildroot config for node.js
BR2_HAVE_DOT_CONFIG=y
BR2_ARCH_IS_64=y
BR2_x86_64=y
BR2_ARCH="x86_64"
BR2_ENDIAN="LITTLE"
BR2_GCC_TARGET_ARCH="nocona"
BR2_ARCH_HAS_ATOMICS=y
BR2_X86_CPU_HAS_MMX=y
BR2_X86_CPU_HAS_SSE=y
BR2_X86_CPU_HAS_SSE2=y