I hereby claim:
- I am maxmanders on github.
- I am maxmanders (https://keybase.io/maxmanders) on keybase.
- I have a public key whose fingerprint is 4D42 A117 3318 1A17 0A98 DDFA 7D04 E21E 3610 854A
To claim this, I am signing this object:
if executable('asdf') | |
let g:asdf_go_path = trim(system('asdf where golang')) | |
let g:go_bin_path = g:asdf_go_path . "/go/bin" | |
endif |
#!/usr/bin/env bash | |
es_get_endpoint() { | |
local domain_name | |
local endpoint | |
domain_name="${1}" | |
endpoint="$(aws es describe-elasticsearch-domain --domain-name ${domain_name} --query 'DomainStatus.Endpoints.vpc' | tr -d '"')" | |
if [ "${endpoint}" = "null" ]; then | |
endpoint="$(aws es describe-elasticsearch-domain --domain-name ${domain_name} --query 'DomainStatus.Endpoint' | tr -d '"')" |
#!/usr/bin/env bash | |
export VAULT_ADDR="http://${VAULT_IP}:${VAULT_PORT}" | |
vaultwalk() { | |
local prefix | |
local secret_keys | |
prefix="${1}" | |
if [ -z "${prefix}" ]; then |
locals { | |
project = "tfternarywtf" | |
chosen_sg = "${var.security_groups}" | |
} | |
data "aws_ami" "ubuntu" { | |
most_recent = true | |
filter { | |
name = "name" |
def remove(emails, infile): | |
try | |
if emails and infile: | |
raise ValueError('Specify one or more emails, or a file path, but not both') | |
pass | |
except ValueError as e: | |
print(e) | |
sys.exit(1) | |
if emails: |
def filter_list(*args): | |
filters = list(args) | |
stuff = #some Boto3 call with a list of dictionaries | |
filtered = (s for s in stuff['Foo'] | |
if all([f(s) for f in filters])) | |
return filtered |
max at maxmanders-laptop in ~/dev/dotfiles (master) | |
$ cat test.sh | |
#!/bin/bash | |
set -e | |
set -o pipefail | |
ZSH=$(which zsh) | |
BASH=$(which bash) | |
ERRORS=() |
ZSH=$(which zsh) | |
BASH=$(which bash) | |
shellcheck <(sed "s|#\!${ZSH}|#\!${BASH}|g" < .zshrc.d/functions.zshrc) |
$ echo "secret" > secret.txt | |
$ key_material=$(aws kms generate-data-key --key-id <CMK_key_id> --key-spec AES_256) | |
$ echo ${key_material} | jq ".CiphertextBlob" | sed 's/"//g' | base64 -d > key.enc | |
$ export key=$(echo ${key_material} | jq ".Plaintext" | sed 's/"//g' | base64 -d) | |
$ openssl enc -aes-256-cbc -pass env:key -in secret.txt -out secret.txt.enc | |
$ rm secret.txt | |
$ ls | |
key.enc secret.txt.enc | |
$ key=$(aws-fd-full kms decrypt --ciphertext-blob fileb://key.enc --output text --query Plaintext | base64 -d) | |
$ openssl enc -d -aes-256-cbc -pass env:key -in secret.txt.enc -out secret.txt |
I hereby claim:
To claim this, I am signing this object: