Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View miketheman's full-sized avatar
🌴
On vacation

Mike Fiedler miketheman

🌴
On vacation
View GitHub Profile
@miketheman
miketheman / run1.log
Created June 30, 2014 19:55
Chef remote_file resource against a Raw GitHub file
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 https://raw.githubusercontent.com/pixelb/ps_mem/master/ps_mem.py
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
miketheman / .kitchen.yml
Created August 27, 2014 21:20
kitchen setup with docker
driver:
name: vagrant
provisioner:
name: chef_zero
platforms:
- name: centos-6.5
- name: ubuntu-10.04
- name: ubuntu-12.04
@miketheman
miketheman / dpkg.sh-session
Created September 16, 2014 13:51
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
@miketheman
miketheman / check_cert.sh-session
Created September 30, 2014 22:16
openssl get certs
$ openssl s_client -showcerts -connect www.datadoghq.com:443 </dev/null
CONNECTED(00000003)
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 www.rapidssl.com/resources/cps (c)14/OU=Domain Control Validated - RapidSSL(R)/CN=*.wpengine.com
i:/C=US/O=GeoTrust, Inc./CN=RapidSSL CA
-----BEGIN CERTIFICATE-----
@miketheman
miketheman / 1_notes.md
Created November 21, 2014 22:18
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
miketheman / console.sh-session
Created February 1, 2015 15:07
nginx 1.6.2 from nginx.org defaults
# dpkg -l nginx
Desired=Unknown/Install/Remove/Purge/Hold
| 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
miketheman / wrapper_example.erb
Created March 10, 2015 16:39
Chef Bootstrap Partial Wrapper Example
bash -x -c -e '
echo $(date +%s) > /etc/created
apt-get update
'
<%
def import(fname)
eruby = Erubis::Eruby.new
@miketheman
miketheman / init.patch
Created March 26, 2015 18:23
opscode-cookbooks commit numero uno, for historical purposes. Link: https://github.com/chef/cookbooks/commit/1f10b2519b3f215ef0ec550913612436bf417eb3
From 1f10b2519b3f215ef0ec550913612436bf417eb3 Mon Sep 17 00:00:00 2001
From: Adam Jacob <adam@hjksolutions.com>
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
miketheman / reset_encoding.rb
Created June 20, 2015 15:45
Use the AWS SDK Ruby gem to create new copies of objects without an invalid Content-Encoding metadata field
#!/usr/bin/env ruby
require 'aws-sdk'
INVALID_ENCODINGS = %w(ANSI_X3.4-1968 UTF-8)
bucket = Aws::S3::Bucket.new(
region: 'us-east-1',
name: 'www.mysite.com'
)
@miketheman
miketheman / GH-2.log
Created July 1, 2015 11:05
lita compare
± |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