Skip to content

Instantly share code, notes, and snippets.

View dancmeyers's full-sized avatar

Dan Meyers dancmeyers

View GitHub Profile
@dancmeyers
dancmeyers / gist:0e0e1b4d529c7e8099142af0a66c1966
Created July 12, 2021 09:28
AWS keypair private key -> AWS console fingerprint
openssl pkcs8 -in keyfile.pem -nocrypt -topk8 -outform DER | openssl sha1 -c
TF_LOG=debug terraform apply
2020/02/03 12:44:21 [WARN] Log levels other than TRACE are currently unreliable, and are supported only for backward compatibility.
Use TF_LOG=TRACE to see Terraform's internal logs.
----
2020/02/03 12:44:21 [INFO] Terraform version: 0.12.20
2020/02/03 12:44:21 [INFO] Go runtime version: go1.12.13
2020/02/03 12:44:21 [INFO] CLI args: []string{"/usr/local/Cellar/tfenv/1.0.2/versions/0.12.20/terraform", "apply"}
2020/02/03 12:44:21 [DEBUG] Attempting to open CLI config file: /Users/meyerd06/.terraformrc
2020/02/03 12:44:21 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2020/02/03 12:44:21 [INFO] CLI command args: []string{"apply"}

Keybase proof

I hereby claim:

  • I am dancmeyers on github.
  • I am carr0t (https://keybase.io/carr0t) on keybase.
  • I have a public key ASC7YA50ukTDr3qCdcEQAsIXiryOd8VyPFsZKiCPFw6Bfwo

To claim this, I am signing this object:

cat <INPUT FILE> | awk '{ bucket = int(($NUM) / <BUCKET SIZE>) * <BUCKET SIZE> ; arr[bucket]++} END { for (i in arr) {print i, arr[i] }}' | sort -g
# e.g.
#
# cat access.log.app025.26072016.txt | awk '{ bucket = int(($6 / 1000000) / 100) * 100 ; arr[bucket]++} END { for (i in arr) {print i, arr[i] }}' | sort -g
# $6 / 1000000 because apache request times are microseconds by default
# bucket '0' is 0-100, '100' is 100-200, etc
envfile=~/.gnupg/gpg-agent.env
if [[ -e "$envfile" ]] && kill -0 $(grep GPG_AGENT_INFO "$envfile" | cut -d: -f 2) 2>/dev/null; then
eval "$(cat "$envfile")"
else
eval "$(gpg-agent --daemon --disable-scdaemon --write-env-file $envfile)"
fi
export GPG_AGENT_INFO