Skip to content

Instantly share code, notes, and snippets.

View sethvargo's full-sized avatar

Seth Vargo sethvargo

View GitHub Profile
[alias]
pr = "!f() { git fetch origin pull/$1/head:sethvargo/pr-$1 && git checkout sethvargo/pr-$1; }; f"
unreleased = "!f() { git fetch --tags && git diff $(git tag | tail -n 1); }; f"
up = "!f() { git fetch --all; git pull origin HEAD; for upstream in $(git remote); do git remote prune "${upstream}"; done }; f"
graph = "!f() { git log --oneline --abbrev-commit --graph --decorate; }; f"
undo = !git reset HEAD~1 --mixed
amend = !git commit --amend --no-edit
top = !git log --format=format:%an | sort | uniq -c | sort -r | head -n 20
x = "!f() { gitx; }; f"
@sethvargo
sethvargo / create-certs.sh
Created June 6, 2018 16:20
Use openssl to create an x509 self-signed certificate authority (CA), certificate signing request (CSR), and resulting private key with IP SAN and DNS SAN
# Define where to store the generated certs and metadata.
DIR="$(pwd)/tls"
# Optional: Ensure the target directory exists and is empty.
rm -rf "${DIR}"
mkdir -p "${DIR}"
# Create the openssl configuration file. This is used for both generating
# the certificate as well as for specifying the extensions. It aims in favor
# of automation, so the DN is encoding and not prompted.
@sethvargo
sethvargo / README.md
Last active October 12, 2018 19:38
A simple script for installing most HashiCorp tools (with GPG verification)
@sethvargo
sethvargo / panic.log
Created May 21, 2017 21:03
Terraform panic
2017/05/21 16:59:43 [INFO] Terraform version: 0.9.6 dev 030f26be4839ef496fa9af58990568aa03e4715a+CHANGES
2017/05/21 16:59:43 [INFO] Go runtime version: go1.8.1
2017/05/21 16:59:43 [INFO] CLI args: []string{"/Users/sethvargo/Development/go/bin/terraform", "destroy", "-force"}
2017/05/21 16:59:43 [DEBUG] Detected home directory from env var: /Users/sethvargo
2017/05/21 16:59:43 [DEBUG] Detected home directory from env var: /Users/sethvargo
2017/05/21 16:59:43 [DEBUG] Attempting to open CLI config file: /Users/sethvargo/.terraformrc
2017/05/21 16:59:43 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2017/05/21 16:59:43 [INFO] CLI command args: []string{"destroy", "-force"}
2017/05/21 16:59:43 [DEBUG] Detected home directory from env var: /Users/sethvargo
2017/05/21 16:59:43 [DEBUG] command: loading backend config file: /Users/sethvargo/Development/chefconf/04-production/terraform
@sethvargo
sethvargo / secret.rb
Created February 1, 2016 21:36
Example Chef extension to extract secrets from HashiCorp's Vault
# Please see the following blog post for more information:
#
# https://www.hashicorp.com/blog/using-hashicorp-vault-with-chef.html
#
resource_name :vault_secret
property :path, String, name_property: true
property :destination, String

Keybase proof

I hereby claim:

  • I am sethvargo on github.
  • I am sethvargo (https://keybase.io/sethvargo) on keybase.
  • I have a public key whose fingerprint is 604B F64B D0C0 06BB 1511 3BB9 3A56 10B2 542B D061

To claim this, I am signing this object: