Skip to content

Instantly share code, notes, and snippets.

View danieldreier's full-sized avatar

Daniel Dreier danieldreier

  • Stripe
  • Rochester, New York
View GitHub Profile
@danieldreier
danieldreier / Plumcake.md
Created October 5, 2019 00:05
Upside down plum cake
12	  	tablespoons (1 1/2 sticks) unsalted butter, room temperature

1	  	cup packed golden brown sugar

1	  	tablespoon honey

6	  	large plums, halved, pitted, each half cut into 6 wedges

1 1/2	  	cups all purpose flour
@danieldreier
danieldreier / keybase.md
Created July 30, 2015 20:02
keybase.md

Keybase proof

I hereby claim:

  • I am danieldreier on github.
  • I am danieldreier (https://keybase.io/danieldreier) on keybase.
  • I have a public key whose fingerprint is 2FDD 7B21 814F 302B EBEA E372 2914 5EFC BA43 79FD

To claim this, I am signing this object:

@danieldreier
danieldreier / submit gradgrind facts
Created November 29, 2014 21:01
Submit Puppet Facts
facter --json | curl -H "Content-Type: application/json" -d @- http://facts.whilefork.com
@danieldreier
danieldreier / coreos-beta-pv-spotpricing.template
Created August 30, 2014 18:51
coreos cloudformation template using spot pricing for us-west-2 region
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "CoreOS on EC2: http://coreos.com/docs/running-coreos/cloud-providers/ec2/",
"Mappings" : {
"RegionMap" : {
"ap-northeast-1" : {
"AMI" : "ami-57032456"
},
@danieldreier
danieldreier / gist:4b32175f10bdd0e04460
Created August 28, 2014 20:04
daniel's vimrc file
" Borrowed from http://skwp.github.io/dotfiles/
" also recommend the following plugins via pathogen:
" puppet
" supertab
" syntastic
" syntastic.old
" tabular
" vim-colors-solarized
" vim-easy-align
" vim-gocode
@danieldreier
danieldreier / create_ca.rb
Created August 10, 2014 17:53
Generate dummy SSL certs using the certificate_authority gem
#!/usr/bin/env ruby
require 'certificate_authority'
# Generate root_cert CA using example code at https://github.com/cchandler/certificate_authority
root_cert = CertificateAuthority::Certificate.new
root_cert.subject.common_name= "Dummy CA Root Certificate"
root_cert.serial_number.number=1
root_cert.key_material.generate_key
root_cert.signing_entity = true
signing_profile = {"extensions" => {"keyUsage" => {"usage" => ["critical", "keyCertSign"] }} }
@danieldreier
danieldreier / install_puppet.sh
Created June 18, 2014 05:59
multi-distro puppet install script
#!/bin/bash
# This script installs puppet on most linux distros.
# To run, simply execute as root.
# $ install_puppet.sh [ puppet_version ]
# e.g. $ install_puppet.sh 3.4.1
# Successfully run on Debian 6/7, Ubuntu 12.04 LTS and 14.04 LTS, Fedora 20, and arch.
# Not tested on OS X, Solaris, AIX, etc, simply because I lack test environments.
set -e
# -*- mode: ruby -*-
# vi: set ft=ruby :
# This configuration requires Vagrant 1.1 or newer and two plugins:
#
# vagrant plugin install vagrant-hosts ~> 2.0.0
# vagrant plugin install vagrant-auto_network ~> 0.2.1
#
# If using Vagrant boxes provided by PuppetLabs, verions 4.2.10 of VirtualBox
# is reccomended.
@danieldreier
danieldreier / Puppetfile
Created January 6, 2014 07:59
Sample Puppetfile
forge "http://forge.puppetlabs.com"
mod "puppetlabs/razor"
mod "puppetlabs/ntp", "0.0.3"
mod "apt",
:git => "git://github.com/puppetlabs/puppetlabs-apt.git"
mod "stdlib",
:git => "git://github.com/puppetlabs/puppetlabs-stdlib.git"
@danieldreier
danieldreier / librarian-puppet-bootstrap.pp
Created January 6, 2014 07:49
Puppet manifest to install librarian-puppet as part of bootstrapping puppet
node default {
package { 'rubygems': ensure => 'installed' }
package { 'librarian-puppet':
ensure => 'installed',
provider => 'gem',
require => Package['rubygems'],
}
# Run librarian-puppet if Puppetfile changed
file { '/etc/puppet/Puppetfile':