Skip to content

Instantly share code, notes, and snippets.

View whiteley's full-sized avatar

Matt Whiteley whiteley

View GitHub Profile
@whiteley
whiteley / -
Created December 23, 2015 02:27
diff --git a/lib/ohai/plugins/linux/network.rb b/lib/ohai/plugins/linux/network.rb
index 689001d..36898b9 100644
--- a/lib/ohai/plugins/linux/network.rb
+++ b/lib/ohai/plugins/linux/network.rb
@@ -77,7 +77,7 @@ Ohai.plugin(:Network) do
# 3) and since we're at it, let's populate some :routes attributes
# (going to do that for both inet and inet6 addresses)
def check_routing_table(family, iface)
- so = shell_out("ip -o -f #{family[:name]} route show")
+ so = shell_out("ip -o -f #{family[:name]} route show table default")
$ /bin/init-checkconf -d /etc/init/procps.conf
DEBUG: upstart_path=/sbin/init
DEBUG: initctl_path=/sbin/initctl
DEBUG: confdir=/tmp/init-checkconf.lNM8R1C04a
DEBUG: file=/etc/init/procps.conf
DEBUG: job=procps
DEBUG: ok - no other running instances detected
DEBUG: upstart_out=/tmp/init-checkconf-upstart-output.x4d3nUnxKn
DEBUG: upstart_cmd=/sbin/init --session --no-sessions --no-startup-event --verbose --confdir /tmp/init-checkconf.lNM8R1C04a
DEBUG: Waiting for Upstart to reply over D-Bus (attempt 1)
@whiteley
whiteley / ec2-import-keypair-all-regions.sh
Created June 19, 2013 22:16
This script copies your keypair to any regions missing it based solely on the keypair name and not the fingerprint.
#!/bin/sh
set -o errexit
set -o nounset
usage() {
echo "Usage: ${0} keypair_name public_key_file"
exit 1
}
@whiteley
whiteley / script.sh
Created June 12, 2013 23:41
Example script for Vagrant provision
#!/bin/bash
"echo Hello, World"
@whiteley
whiteley / gist:5414172
Created April 18, 2013 16:35
AWS Region support for prompt
🌲:havak:~$ region us-west-1
🏄:havak:~$ region us-east-1
💥:havak:~$ region eu-west-1
🍀:havak:~$
diff --git a/autogen/configure b/autogen/configure
index 0ba9863..0e95975 100755
--- a/autogen/configure
+++ b/autogen/configure
@@ -26609,7 +26609,7 @@ case "$opsys" in
## each); under Cocoa 31 commands are required.
if test "$HAVE_NS" = "yes"; then
libs_nsgui="-framework AppKit"
- headerpad_extra=6C8
+ headerpad_extra=8C0
@whiteley
whiteley / test.preseed
Created February 20, 2013 18:11
Oz test for Ubuntu url mode
d-i debian-installer/locale string en_US
d-i console-setup/ask_detect boolean false
d-i console-setup/layoutcode string us
d-i netcfg/choose_interface select auto
d-i netcfg/get_hostname string unassigned-hostname
d-i netcfg/get_domain string unassigned-domain
d-i netcfg/wireless_wep string
d-i clock-setup/utc boolean true
@whiteley
whiteley / notes.md
Created February 20, 2013 04:13
notes about notes
@whiteley
whiteley / create_mcf.sh
Last active December 13, 2015 18:18 — forked from drnic/create_mcf.sh
#!/usr/bin/env bash
set -e # exit immediately if a simple command exits with a non-zero status
set -u # report the usage of uninitialized variables
STEMCELLS_DIR=${STEMCELLS_DIR:-/var/vcap/store/stemcells}
RELEASES_DIR=${REPOS_DIR:-/var/vcap/store/releases}
REPOS_DIR=${REPOS_DIR:-/var/vcap/store/repos}
CF_RELEASE_BRANCH=${CF_RELEASE_BRANCH:-staging}
@whiteley
whiteley / gist:4953648
Created February 14, 2013 15:46
Please enter your Twitter password. Fancy.
havak:~$ curl -D - -L -v http://t.co/DlHFba3
* About to connect() to t.co port 80 (#0)
* Trying 199.59.150.44...
* connected
* Connected to t.co (199.59.150.44) port 80 (#0)
> GET /DlHFba3 HTTP/1.1
> User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8r zlib/1.2.5
> Host: t.co
> Accept: */*
>