Skip to content

Instantly share code, notes, and snippets.

View ody's full-sized avatar

Cody Herriges ody

  • Oregon, United States of America
View GitHub Profile
user { 'bob':
ensure => present,
}
user { 'isntbob':
ensure => absent,
name => 'bob',
}
@ody
ody / gist:979893
Created May 19, 2011 00:15
Ruby 1.9.2 puppet cert failure.
HEAD is now at fc0add1... Updated CHANGELOG for 2.7.0rc3
ody@orihime:[puppet]% rvm use 1.9.2
Using /Users/ody/.rvm/gems/ruby-1.9.2-p180
ody@orihime:[puppet]% envpuppet puppet cert --list
Could not parse options: wrong number of arguments (1 for 0)
@ody
ody / gist:866485
Created March 11, 2011 20:13
mca vim snippet.
snippet mca
module MCollective
module Agent
class ${1:Agentname}<RPC::Agent
metadata
:name => "${2:agentname}",
:description => "Performs $2 actions",
:author => "${3:myname}",
:license => "${4:BSD}",
:version => "${5:0.0.1}",
ruby-1.8.7-p334 :003 > topic 'foo', 'hello'
Sent hello to /topic/foo
=> nil
ruby-1.8.7-p334 :004 > topic 'foo', 'hello'
<<stomp>> hello
Sent hello to /topic/foo
=> nil
ruby-1.8.7-p334 :005 > topic 'foo', 'hello'
<<stomp>> hello
Sent hello to /topic/foo
ody@orihime:[stomp-irb]% ruby stomp-irb -s localhost --port 61613 -u guest -P guest
Interactive Ruby shell for STOMP
Type 'help' for usage instructions
ruby-1.8.7-p334 :001 > subscribe :topic, 'foo'
Current Subscriptions:
/topic/foo
=> nil
@ody
ody / gist:824195
Created February 12, 2011 22:27
Bad idea?
class params {
$foo = 'bar'
}
define blort() {
include params
notify{ $name: message => $params::foo }
}
blort { 'works?': }