Skip to content

Instantly share code, notes, and snippets.

View jeffmccune's full-sized avatar

Jeff McCune jeffmccune

View GitHub Profile
@jeffmccune
jeffmccune / auth.conf
Created October 24, 2012 18:34
Puppet fileserver.conf auth_ip work around
# This is an example auth.conf file, which implements the
# defaults used by the puppet master.
#
# The ACLs are evaluated in top-down order. More general
# stanzas should be towards the bottom of the file and more
# specific ones at the top, otherwise the general rules
# take precedence and later rules will not be evaluated.
#
# Supported syntax:
# Each stanza in auth.conf starts with a path to mach, followed
@jeffmccune
jeffmccune / passenger_where_are_you.md
Created October 11, 2012 18:17
passenger_where_are_you.md
jeff@puppetmaster:~$ /opt/puppet/bin/irb
irb(main):001:0> require 'phusion_passenger'
LoadError: no such file to load -- phusion_passenger
        from (irb):1:in `require'
        from (irb):1
        from :0
irb(main):002:0> require 'rubygems'
=> true
@jeffmccune
jeffmccune / jeff_plan.md
Created October 5, 2012 16:51
Jeff's .plan

2012-10-05

Yesterday

  • email 3.x deletion email
  • delete 3.x branch
  • delete 3.x jenkins jobs
  • #3530
@jeffmccune
jeffmccune / kick_test.diff
Created September 6, 2012 23:30
tests for kick deprecation
diff --git a/lib/puppet/application/kick.rb b/lib/puppet/application/kick.rb
index f0edbcf..f14ccac 100644
--- a/lib/puppet/application/kick.rb
+++ b/lib/puppet/application/kick.rb
@@ -300,7 +300,7 @@ Copyright (c) 2011 Puppet Labs, LLC Licensed under the Apache 2.0 License
def setup
super()
raise Puppet::Error.new("Puppet kick is not supported on Microsoft Windows") if Puppet.features.microsoft_windows?
- Puppet.deprecation_warning "Puppet kick is deprecated. See http://tbd"
+ # Puppet.deprecation_warning "Puppet kick is deprecated. See http://tbd"
@jeffmccune
jeffmccune / puppet_kick_deprecation.md
Created September 6, 2012 19:01
Puppet kick deprecation warning

Mocked up agent deprecation warning

Command line argument

$ puppet agent --verbose --no-daemonize --listen
Warning: The listen setting is deprecated and will be removed in ???.  Please see alternatives at http://tbd
...
@jeffmccune
jeffmccune / puppet_mountain_lion.markdown
Created August 21, 2012 04:55
Mountain Lion rbenv setup

Setup Procedure

Given a base Mountain Lion VM

Setup SSH Keys

mkdir ~/.ssh
chmod 700 !$
curl -o ~/.ssh/authorized_keys https://raw.github.com/puppetlabs/puppetlabs-sshkeys/master/templates/ssh/authorized_keys
@jeffmccune
jeffmccune / gist:3385373
Created August 18, 2012 08:46
Mountain Lion rbenv.md

rbenv 1.9.3-p194 build

To avoid OpenSSL segfaults, link ruby against macports' OpenSSL in /opt/local.

Before you install Ruby, make sure you have MacPorts installed for Mountain Lion.

$ CONFIGURE_OPTS="--with-openssl-dir=/opt/local" rbenv install 1.9.3-p194
Downloading http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz...
Installing yaml-0.1.4...
Installed yaml-0.1.4 to /Users/jeff/.rbenv/versions/1.9.3-p194
@jeffmccune
jeffmccune / class_constants.md
Created August 16, 2012 20:43
Ruby classes and threads

class_constants.rb

#! /usr/bin/env ruby

t1 = Thread.new do
  sleep(5)
  puts "defining Klass"
  class Klass; end
end
@jeffmccune
jeffmccune / time_machine.md
Created August 14, 2012 18:44
Script your time machine volume

Unmount and remount via zsh

$ stdout=$(diskutil umount /Volumes/SlowSpare)
$ echo $stdout
Volume SlowSpare on disk1s4 unmounted
$ disk=${stdout##* on }
$ disk=${disk%% un*}   
$ diskutil mount $disk 
Volume SlowSpare on disk1s4 mounted
@jeffmccune
jeffmccune / ruby_toolchain_10_8.markdown
Created July 30, 2012 20:56
Ruby Toolchain on Mac OS X Mountain Lion (10.8)

Overview

The intention is to get a clean build of MRI 1.8.7 and 1.9.3.

MRI 1.8.7 doesn't play nicely with LLVM based GCC compilers. In Mountain Lion, the only way to get a non-LLVM gcc is to build one yourself. The command line tools package in Xcode 4.4 does not contain a non-llvm based GCC.

Checklist

  1. Upgrade to Mountain Lion
  2. Remove all previous copies of Xcode