Skip to content

Instantly share code, notes, and snippets.

bhouse /
Created Feb 8, 2016
Centos 7.2.1511 via systemd-nspawn

Make a directory to install CentOS 7.2.1511 in

[root@localhost ~]# mkdir /centos_chroot

Make a directory for the rpm database

[root@localhost ~]# mkdir -p /centos_chroot/var/lib/rpm

Create the RPM database

#!/bin/bash -e
# Setup a Root CA in vault
# Generate and sign an Intermediate cert
# Requires:
# * A running vault server already initialzed and unsealed
# * Environment variable VAULT_TOKEN is set
# * vault cli (
# * httpie (
bhouse /
Created Jan 22, 2020
YubiKey GPG + GitHub setup

Yubikey + GPG + Github + Keybase

The following guide are steps that can be used to generate GPG keys on a YubiKey, use the gpg keys to sign github commits, and publish the public gpg key to Keybase.

Why is this a good idea?

  1. Generating and storing GPG keys on a YubiKey allows the private key to be protected and ported between physical machines.
  2. Signing git commits adds an extra layer of verification that code changes originated from an trusted source.
  3. Using a YubiKey + touch-to-sign requires a physical presence to use the GPG signing key.
  4. GitHub supports restricting commits to a repo to only those that are signed.
  5. Putting a physical stamp on your code commits invokes a feeling of pride.
View gist:70a38f5738a44acace0807e3261e04bf
mkdir vault_demo && cd vault_demo
export PATH=$(pwd):$PATH
cat > vault.conf <<EOF
backend "file" {
path = "file_backend"
listener "tcp" {
View stopinator.rb
def ec2 => 'AWS',
:aws_secret_access_key => ENV['EC2_SECRET_KEY'],
:aws_access_key_id => ENV['EC2_ACCESS_KEY'])
def tenured? (instance)
instance.created_at && (instance.created_at < Chronic.parse('50 minutes ago'))
bhouse / gist:5249306
Created Mar 26, 2013
datadog berks upload
View gist:5249306
➜ datadog berks -v
Berkshelf (1.3.1)
Author:: Jamie Winsor (<>)
Author:: Josiah Kiehl (<>)
Author:: Michael Ivey (<>)
Author:: Justin Campbell (<>)
Copyright 2012 Riot Games
View gist:4662299
➜ ~ git clone git:// 2357
Cloning into 'razor-vagrant-lab'...
remote: Counting objects: 257, done.
remote: Compressing objects: 100% (120/120), done.
remote: Total 257 (delta 137), reused 231 (delta 111)
Receiving objects: 100% (257/257), 36.79 KiB, done.
Resolving deltas: 100% (137/137), done.
➜ ~ cd razor-vagrant-lab 2359
direnv: loading ~/razor-vagrant-lab/.envrc
➜ razor-vagrant-lab git:(master) VBoxManage dhcpserver remove --netname vboxnet0 2360

Keybase proof

I hereby claim:

  • I am bhouse on github.
  • I am benhouse ( on keybase.
  • I have a public key whose fingerprint is C615 8D5A 7F72 5F8F C921 0D2F 2C59 5D16 D54A ECCB

To claim this, I am signing this object:

View ebs-usage.rb
#!/usr/bin/env ruby
require 'aws-sdk'
ec2 = 'us-west-1')
volumes = ec2.describe_volumes.volumes
volume_sizes = {}
volumes.each do |vol|
View gist:e230018e7034bf42a65e

Keybase proof

I hereby claim:

  • I am bhouse on github.
  • I am bhousezendesk ( on keybase.
  • I have a public key whose fingerprint is 8D97 8A17 8249 A29F 451D 7F0B 01C9 A9C7 2950 88DB

To claim this, I am signing this object: