Skip to content

Instantly share code, notes, and snippets.

View jessereynolds's full-sized avatar

Jesse Reynolds jessereynolds

  • Puppet
  • Melbourne, Victoria, Australia
View GitHub Profile
@jessereynolds
jessereynolds / multiple default routes on mac
Created October 3, 2011 23:42
Problem with multiple default routes on mac os x 10.7.1 (Lion)
Well this is annoying.
Today I am using USB to my iPhone 3GS for internet access on Telstra next-g. Things work fine. Network System Preferences says "iPhone USB is currently active and has the IP address 172.20.10.2.".
Here's the routing table:
Destination Gateway Flags Refs Use Netif Expire
default 172.20.10.1 UGSc 77 6 en3
127 127.0.0.1 UCS 0 0 lo0
127.0.0.1 127.0.0.1 UH 9 8776 lo0
@jessereynolds
jessereynolds / unicorn
Created January 26, 2012 21:44
/etc/init.d script for unicorn
#!/bin/sh
#
# init.d script for single or multiple unicorn installations. Expects at least one .conf
# file in /etc/unicorn
#
# Modified by jay@gooby.org http://github.com/jaygooby
# based on http://gist.github.com/308216 by http://github.com/mguterl
#
## A sample /etc/unicorn/my_app.conf
##
This file has been truncated, but you can view the full file.
==> Installing mtr dependency: gtk+
==> 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
@jessereynolds
jessereynolds / brew --config
Created May 7, 2012 12:25
brew install mtr - problems with gtk+
jesse@Heart-of-Gold ~ $ brew --config
HOMEBREW_VERSION: 0.9
HEAD: 2808a7eeaf92dd2c5abcf43dbec154d14c2d5cc4
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: 8-core 64-bit sandybridge
OS X: 10.7.3
Kernel Architecture: x86_64
Xcode: 4.3.2
GCC-4.0: N/A
@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
@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 / 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 / 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 / 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: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