Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python3
import os
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives import hashes, keywrap, serialization
from cryptography.hazmat.primitives.asymmetric import ec, padding
from google.cloud import kms
client = kms.KeyManagementServiceClient()
This file has been truncated, but you can view the full file.
INFO global: Vagrant version: 1.9.1
INFO global: Ruby version: 2.2.5
INFO global: RubyGems version: 2.4.5.1
INFO global: VAGRANT_OLD_ENV_HOME="/home/bhess"
INFO global: VAGRANT_OLD_ENV_PWD="/home/bhess/Code/vagrantfile-fail"
INFO global: VAGRANT_OLD_ENV_QTLIB="/usr/lib64/qt-3.3/lib"
INFO global: VAGRANT_EXECUTABLE="/opt/vagrant/embedded/gems/gems/vagrant-1.9.1/bin/vagrant"
INFO global: VAGRANT_OLD_ENV_XDG_SESSION_ID="2292"
INFO global: VAGRANT_OLD_ENV_QTDIR="/usr/lib64/qt-3.3"
INFO global: VAGRANT_OLD_ENV_GPG_TTY="/dev/pts/20"
@bdhess
bdhess / keybase.md
Last active December 17, 2017 02:42

Keybase proof

I hereby claim:

  • I am bdhess on github.
  • I am bdhess (https://keybase.io/bdhess) on keybase.
  • I have a public key whose fingerprint is 5AFB C999 3FB0 3A77 C113 B8D3 D4B4 228E E8C1 155A

To claim this, I am signing this object:

#!/bin/sh
# Avoid using the default key protection algorithm in 'openssl req' due to weakness
# See https://github.com/ept/blog/blob/c91c4ffa4d19024b73296912a249e86525a889a4/src/ssh-keys.md
openssl req -new -newkey rsa:2048 -nodes -keyout key.pem.insecure -sha256 -out cert.csr \
-subj "/C=US/ST=Pennsylvania/L=Philadelphia/CN=Bradley Hess/emailAddress=bdhess@pobox.com"
# With OpenSSL >= v1.0.2, the -v2prf option is added to specify the hash function
# e.g., -v2prf hmacWithSHA256
# With OpenSSL >= v1.1.0, the -iter option is added to increase the number of
# iterations for the key derivation function (default is 2048)
# To run directly from powershell:
# iex ((new-object net.webclient).DownloadString('https://gist.githubusercontent.com/bdhess/51520a44ec1ac11a1965/raw/bootstrap.ps1'))
Set-ExecutionPolicy Unrestricted -Force
iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))
cinst -y boxstarter
Install-BoxstarterPackage -PackageName https://gist.githubusercontent.com/bdhess/51520a44ec1ac11a1965/raw/install.ps1