Skip to content

Instantly share code, notes, and snippets.

View nigelkersten's full-sized avatar

Nigel Kersten nigelkersten

View GitHub Profile

Keybase proof

I hereby claim:

  • I am nigelkersten on github.
  • I am nigelkersten (https://keybase.io/nigelkersten) on keybase.
  • I have a public key whose fingerprint is 5D89 2D78 8865 2FE5 749D F6C7 4454 66EA 6683 CA0C

To claim this, I am signing this object:

function puppetcurl() {
if [ -z $1 ]; then
echo "must supply a thing"
return 1
fi
curl --cert $(puppet agent --configprint hostcert) \
--key $(puppet agent --configprint hostprivkey) \
--cacert $(puppet agent --configprint cacert) \

Puppet Static Compiler

The static compiler was added to Puppet in the 2.7.0 release. 1

Overview

diff --git a/lib/fission/action/vm/starter.rb b/lib/fission/action/vm/starter.rb
index 1e0969a..0e7a317 100644
--- a/lib/fission/action/vm/starter.rb
+++ b/lib/fission/action/vm/starter.rb
@@ -58,10 +58,13 @@ module Fission
end
end
+ headless = options[:headless] unless options[:headless].blank?
+ headless ||= Fission.config['headless'] unless Fission.config['headless'].nil?
@nigelkersten
nigelkersten / if-puppet-was-more-like-objective-c.pp
Created June 14, 2011 05:18
If Puppet was more like Objective-C
apache_pkg = [[Package alloc] initWithEnsure: latest];
apache_conf = [[File alloc] initWithEnsure: file source: @"puppet:///modules/apache/apache2.conf"];
apache_service = [[Service alloc] initWithEnsure: running enable: true];
[[PLNotificationCenter defaultCenter] addNotification:apache_conf target:apache_service];
[[PLRequirementCenter defaultCenter] addRequirement:apache_service target:apache_pkg];
@nigelkersten
nigelkersten / if-puppet-was-more-like-python.pp
Created June 14, 2011 04:46
If Puppet was more like Python
file /etc/apache2/apache2.conf:
ensure file
source puppet:///modules/apache/apache2.conf
notify Service[apache]
service apache:
ensure running
enable true
require Package[apache]
@nigelkersten
nigelkersten / env_puppet_with_puppet_interfaces.sh
Created February 24, 2011 05:13
Step by Step envpuppet with puppet interfaces
kripke:~ nbk$ mkdir /tmp/src
kripke:~ nbk$ cd !$
cd /tmp/src
kripke:src nbk$ git clone git://github.com/puppetlabs/puppet.git
Cloning into puppet...
remote: Counting objects: 71917, done.
remote: Compressing objects: 100% (22032/22032), done.
remote: Total 71917 (delta 52581), reused 66473 (delta 48322)
Receiving objects: 100% (71917/71917), 12.11 MiB | 2.46 MiB/s, done.
Resolving deltas: 100% (52581/52581), done.
@nigelkersten
nigelkersten / SystemConfigurationPythonMac
Created October 18, 2010 22:17
SystemConfig examples with Python on OS X
These links aren't always easy to find.
http://developer.apple.com/library/mac/#documentation/Networking/Reference/SCNetworkConfiguration/Reference/reference.html
http://developer.apple.com/library/mac/#documentation/Networking/Reference/SCPreferences/Reference/reference.html
nigelk$ python
Python 2.6.1 (r261:67515, Feb 11 2010, 00:51:29)
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
@nigelkersten
nigelkersten / pymacds node stuff
Created October 18, 2010 18:09
pymacds node stuff
nigelk$ sudo python2.6
Python 2.6.1 (r261:67515, Feb 11 2010, 00:51:29)
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pymacds
>>> pymacds.GetSearchNodes()
['/Local/Default', '/BSD/local', '/LDAPv3/ldap.corp.google.com']
>>> pymacds.EnsureSearchNodeAbsent('/LDAPv3/ldap.corp.google.com')
>>> pymacds.GetSearchNodes()
['/Local/Default', '/BSD/local']