Skip to content

Instantly share code, notes, and snippets.

View jessereynolds's full-sized avatar

Jesse Reynolds jessereynolds

View GitHub Profile
@jessereynolds
jessereynolds / flapjack_visage.json
Created July 25, 2013 08:27
visage json for curl_json-flapjack/derive-all_time-action
{"heart-of-gold.local":{"curl_json-flapjack":{"derive-all_time-action":{"value":{"start":1374736284,"finish":1374740750,"data":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,n
INFO executive: 2013-07-05 11:56:04 +0930 | client1-localhost-test-1:HTTP Port 443 | acknowledgement | NO CONTACTS
INFO executive: 2013-07-05 11:56:17 +0930 | client1-localhost-test-1:HTTP Port 443 | acknowledgement | NO CONTACTS
2013-07-10T15:27:24+09:30 [INFO] :: notify :: client1-localhost-test-1:HOST | problem | NO CONTACTS
2013-07-10T15:27:54+09:30 [INFO] :: notify :: client1-localhost-test-1:HOST | recovery | NO CONTACTS
@jessereynolds
jessereynolds / gist:5849704
Last active December 18, 2015 21:48
puppet - accessing items of an array within a hash from an erb template
I'm having trouble iterating over an array, that's been retrieved from a hash. Here's the hash definition in the node manifest:
$alias_ips = {
24 => [
'10.254.16.82/24',
],
}
This hash is passed as a parameter to a named type, which in turn processes an erb template
as part of a File definition. The erb file contains:
@jessereynolds
jessereynolds / test.rb
Created April 26, 2013 00:37
@johnf's code that reproduces the stack level too deep error on ubuntu 12.04.2 vm on esx comment out the [1].each do on line 42 and the problem goes away. I think defs foo and bar are not required to trigger the error.
#!/usr/bin/env ruby
require 'eventmachine'
require 'em-synchrony'
require 'thin'
#require 'thin/version'
#module Thin
# def self.win? # Are we runing windows
# true
@jessereynolds
jessereynolds / gist:5351787
Created April 10, 2013 04:26
ice cube example serialisation
Yearly on the 13th day of the month on Fridays in October
YAML:
---
:start_date: 2013-04-09 21:23:19.275992000 -07:00
:rrules:
- :validations:
:day_of_month:
- 13
@jessereynolds
jessereynolds / Gemfile
Created February 12, 2013 00:22
Unable to install omniauth-ldap 1.0.3 with bundler
#!/usr/bin/env ruby
source :rubygems
gem 'omniauth-ldap', '~> 1.0.3'
@jessereynolds
jessereynolds / gist:3968401
Created October 28, 2012 11:43
apr-1.4.6 is not available on the repository (Joyent 2012Q2)
[root@cp-www ~]# pkgin install ap22-ruby18-passenger-3.0.15
calculating dependencies... done.
nothing to upgrade.
7 packages to be installed: tcp_wrappers-7.6.1nb4 openldap-client-2.4.30 expat-2.1.0 apr-util-1.4.1nb1 apr-1.4.6 apache-2.2.22nb1 ap22-ruby18-passenger-3.0.15 (27M to download, 0B to install)
proceed ? [Y/n] y
downloading packages...
tcp_wrappers-7.6.1nb4.tgz 100% 100KB 100.4KB/s 100.4KB/s 00:01
openldap-client-2.4.30.tgz 100% 1174KB 234.8KB/s 25.1KB/s 00:05
@jessereynolds
jessereynolds / gist:3798317
Created September 28, 2012 06:46
newrelic flapjack error
[09/28/12 16:15:05 +0930 Heart-of-Gold.local (19061)] DEBUG : Sending data to New Relic Service
[09/28/12 16:15:05 +0930 Heart-of-Gold.local (19061)] DEBUG : Sending data to New Relic Service
[09/28/12 16:15:05 +0930 Heart-of-Gold.local (19061)] ERROR : Error running task in Agent Worker Loop 'Broken pipe': /Users/jesse/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/newrelic_rpm-3.4.2.1/lib/new_relic/agent/pipe_channel_manager.rb:46:in `write'
[09/28/12 16:15:05 +0930 Heart-of-Gold.local (19061)] DEBUG : /Users/jesse/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/newrelic_rpm-3.4.2.1/lib/new_relic/agent/pipe_channel_manager.rb:46:in `write'
/Users/jesse/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/newrelic_rpm-3.4.2.1/lib/new_relic/agent/pipe_channel_manager.rb:46:in `<<'
/Users/jesse/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/newrelic_rpm-3.4.2.1/lib/new_relic/agent/pipe_channel_manager.rb:46:in `write'
/Users/jesse/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/newrelic_rpm-3.
@jessereynolds
jessereynolds / collectd_exec_example
Created June 6, 2012 00:05
collectd exec plugin fork freeze
#!/bin/bash
HOSTNAME="${COLLECTD_HOSTNAME:-localhost}"
INTERVAL="${COLLECTD_INTERVAL:-10}"
while sleep "$INTERVAL"; do
VALUE=1.23
echo "PUTVAL \"$HOSTNAME/exec-magic/gauge-magic_level\" interval=$INTERVAL N:$VALUE"
done
@jessereynolds
jessereynolds / brew install -v gtk+
Created May 7, 2012 12:42
brew install gtk+ error
This file has been truncated, but you can view the full file.
==> Downloading http://ftp.gnome.org/pub/gnome/sources/gtk+/2.24/gtk+-2.24.10.tar.xz
Already downloaded: /Users/jesse/Library/Caches/Homebrew/gtk+-2.24.10.tar.xz
xz -dc "/Users/jesse/Library/Caches/Homebrew/gtk+-2.24.10.tar.xz" | /usr/bin/tar xf -
==> ./configure --disable-debug --disable-dependency-tracking --prefix=/usr/local/Cellar/gtk+/2.24.10 --disable-glibtest --disable-introspection --disable-visibility
./configure --disable-debug --disable-dependency-tracking --prefix=/usr/local/Cellar/gtk+/2.24.10 --disable-glibtest --disable-introspection --disable-visibility
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no