Skip to content

Instantly share code, notes, and snippets.

View krobertson's full-sized avatar

Ken Robertson krobertson

View GitHub Profile
@krobertson
krobertson / launchd.rb
Created July 2, 2011 15:12 — forked from raggi/launchd.rb
A first stab at a launchd provider for chef
class Chef::Provider::Service::Launchd < Chef::Provider::Service::Simple
LAUNCHCTL_FORMAT = /([\d-]+)\s+([\d-]+)\s+([[:print:]]+)/
def initialize(new_resource, run_context)
raise ArgumentError, "run_context cannot be nil" unless run_context
super
run_context.node
end
@krobertson
krobertson / set_environment.rb
Created July 14, 2011 22:18 — forked from nstielau/set_environment.rb
A Knife plugin to set node environment
## Knife plugin to set node environment
# See http://wiki.opscode.com/display/chef/Environments
#
## Install
# Place in .chef/plugins/knife/set_environment.rb
#
## Usage
# Nick-Stielaus-MacBook-Pro:chef-repo nstielau$ knife node set_environment mynode.net my_env
# Looking for mynode.net
# Setting environment to my_env
@krobertson
krobertson / railscasts.vim
Created July 21, 2011 04:38
My version of railscasts.vim
" Vim color scheme
"
" Name: railscast.vim
" Maintainer: Josh O'Rourke <[email protected]>
" License: public domain
"
" A GUI Only port of the RailsCasts TextMate theme [1] to Vim.
" Some parts of this theme were borrowed from the well-documented Lucius theme [2].
"
" [1] http://railscasts.com/about
@krobertson
krobertson / README.md
Created August 31, 2011 01:40
First past at the Nagios NRPE packet in ruby

Fire up the ruby server with:

ruby server.rb 49644

Then call check_nrpe with:

check_nrpe -H localhost -p 49644 -c check_awesome

Or with parameters, like:

# The definition...
define :check_mysql_seconds_behind_master do
attribute :username, :kind_of => String
attribute :password, :kind_of => String
attribute :warning, :kind_of => Fixnum, :default => 20
attribute :critical, :kind_of => Fixnum, :default => 60
require_gem 'mysql'
execute do
@krobertson
krobertson / gist:1401859
Created November 28, 2011 20:20
rvm + jruby instafail
:~> rvm jruby
[15] 3103
1.6.5:~> irb
[15] + suspended (tty output) ( JRUBY_OPTS='' jruby --ng-server 2>&1 > /dev/null; )
(5 mins later)
^\zsh: quit irb
1.6.5:~> rvm --version
rvm 1.9.2 by Wayne E. Seguin ([email protected]) [https://rvm.beginrescueend.com/]
@krobertson
krobertson / collector.go
Last active December 17, 2015 21:19 — forked from ober/collector.go
package main
import (
"flag"
"fmt"
"io"
"io/ioutil"
"net/http"
"os"
"strings"
@krobertson
krobertson / fix.patch
Last active September 30, 2015 23:30
AUR package vmware-patch patch for Workstation 11.1.2 with 4.2 kernel
From 1fb71794b4d53d203fc64dc5d57baa5850991303 Mon Sep 17 00:00:00 2001
From: Ken Robertson <[email protected]>
Date: Tue, 29 Sep 2015 12:58:00 -0700
Subject: [PATCH] Applied patches for Workstation 11.1.2 on 4.2 kernel.
Patches were taken from the VMware forums here:
https://communities.vmware.com/thread/517279
---
PKGBUILD | 14 +-
From e26d0d62248a6245ee5b204595dadd9b047d9192 Mon Sep 17 00:00:00 2001
From: Ken Robertson <[email protected]>
Date: Mon, 2 Nov 2015 12:06:56 -0800
Subject: [PATCH] blarg
---
.../aws/aws-sdk-go/service/s3/s3manager/download.go | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/s3/s3manager/download.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/s3/s3manager/download.go
https://www.dropbox.com/s/hjdhsugyg7d1tpu/ken-sf-k8s.pdf?dl=0