Skip to content

Instantly share code, notes, and snippets.

Working from home

Mike Fiedler miketheman

Working from home
View GitHub Profile
miketheman / run1.log
Created Jun 30, 2014
Chef remote_file resource against a Raw GitHub file
View run1.log
INFO: remote_file[/usr/local/bin/ps_mem] created file /usr/local/bin/ps_mem
DEBUG: remote_file[/usr/local/bin/ps_mem] checking for changes
DEBUG: Cache control headers: {}
DEBUG: Chef::HTTP calling Chef::HTTP::Decompressor#handle_request
DEBUG: Chef::HTTP calling Chef::HTTP::CookieManager#handle_request
DEBUG: Chef::HTTP calling Chef::HTTP::ValidateContentLength#handle_request
DEBUG: Initiating GET to
DEBUG: ---- HTTP Request Header Data: ----
DEBUG: Accept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3
DEBUG: ---- End HTTP Request Header Data ----
miketheman / .kitchen.yml
Created Aug 27, 2014
kitchen setup with docker
View .kitchen.yml
name: vagrant
name: chef_zero
- name: centos-6.5
- name: ubuntu-10.04
- name: ubuntu-12.04
miketheman /
Created Sep 16, 2014
packages with epochs
$ dpkg -l | grep '1:'
ii acpid 1:2.0.10-1ubuntu3 Advanced Configuration and Power Interface event daemon
ii automake 1:1.11.3-1ubuntu2 Tool for generating GNU Standards-compliant Makefiles
ii bash-completion 1:1.3-1ubuntu8.1 programmable completion for the bash shell
ii bind9-host 1:9.8.1.dfsg.P1-4ubuntu0.8 Version of 'host' bundled with BIND 9.X
ii bison 1:2.5.dfsg-2.1 YACC-compatible parser generator
ii bsdutils 1:2.20.1-1ubuntu3.1 Basic utilities from 4.4BSD-Lite
ii busybox-initramfs 1:1.18.5-1ubuntu4.1 Standalone shell setup for initramfs
ii busybox-static 1:1.18.5-1ubuntu4.1 Standalone rescue shell with tons of builtin utilities
ii datadog-agent 1:5.0.0-496 Datadog Moni
$ openssl s_client -showcerts -connect </dev/null
depth=2 /C=US/O=GeoTrust Inc./CN=GeoTrust Global CA
verify error:num=20:unable to get local issuer certificate
verify return:0
Certificate chain
0 s:/serialNumber=dzc7avuEuqhZCEL82HF5aqoCQMgtwixa/OU=GT41552380/OU=See (c)14/OU=Domain Control Validated - RapidSSL(R)/CN=*
i:/C=US/O=GeoTrust, Inc./CN=RapidSSL CA
miketheman /
Created Nov 21, 2014
Benchmark of using different methods to convert complex Mash to Hash

Using the following Gem versions:

  • benchmark-ips (2.1.0)
  • chef (11.16.4), which includes:
    • erubis (2.7.0)
    • json (1.8.1)

Ruby 1.9.3:

Calculating -------------------------------------
miketheman /
Created Feb 1, 2015
nginx 1.6.2 from defaults
# dpkg -l nginx
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
ii nginx 1.6.2-1~trusty amd64 high performance web server
# dpkg --status nginx
Package: nginx
miketheman / wrapper_example.erb
Created Mar 10, 2015
Chef Bootstrap Partial Wrapper Example
View wrapper_example.erb
bash -x -c -e '
echo $(date +%s) > /etc/created
apt-get update
def import(fname)
eruby =
View init.patch
From 1f10b2519b3f215ef0ec550913612436bf417eb3 Mon Sep 17 00:00:00 2001
From: Adam Jacob <>
Date: Sat, 17 Jan 2009 16:45:51 -0800
Subject: [PATCH] Adding opscode cookbooks
LICENSE | 201 +++++++
NOTICE | 12 +
apache2/attributes/apache.rb | 72 +++
apache2/definitions/apache_module.rb | 36 ++
miketheman / reset_encoding.rb
Created Jun 20, 2015
Use the AWS SDK Ruby gem to create new copies of objects without an invalid Content-Encoding metadata field
View reset_encoding.rb
#!/usr/bin/env ruby
require 'aws-sdk'
bucket =
region: 'us-east-1',
name: ''
View GH-2.log
± |miketheman/specs {1} ?:3 ✗| ∴ → bundle exec lita
[2015-07-01 10:59:24 UTC] DEBUG: Loading aliases
Type "exit" or "quit" to end the session.
Lita > lita help
[2015-07-01 10:59:30 UTC] DEBUG: Dispatching message to Lita::Handlers::Help#help.
Lita: help - Lists help information for terms and command the robot will respond to.
Lita: help COMMAND - Lists help information for terms or commands that begin with COMMAND.
Lita: info - Replies with the current version of Lita.
Lita: users find SEARCH_TERM - Find a Lita user by ID, name, or mention name.
Lita: alias add NAME COMMAND - Alias for sending COMMAND when NAME typed