Skip to content

Instantly share code, notes, and snippets.

View big-samantha's full-sized avatar

Samantha Smith big-samantha

View GitHub Profile
# Install and configure activemq service.
# mcollective depends on this to work as an intermediary.
class activemq {
include
'activemq::install',
'activemq::config',
'activemq::service'
Class['::activemq::install'] ->
Class['::activemq::config'] ~>
# print a string
puts 'Let\'s practice everything.'
# print another string.
puts 'You\'d need to know \'bout excapes with \\ that do \n newlines and \t tabs.'
# preformatted multiline string. only exception is that it can use escape chars
# saved to variable
poem = <<MULTI_LINE_STRING
\tThe lovely world
module Ex25
def self.break_words(stuff)
# This functino will break up words for us.
words = stuff.split(' ')
words
end
def self.sort_words(words)
# Sorts the words.
words.sort()
module Ex25
def self.break_words(stuff)
# This function will break up words for us.
words = stuff.split(' ')
words
end
def self.sort_words(words)
# Sorts the words.
words.sort()
the_count = [1, 2, 3, 4, 5]
fruits = ['apples', 'oranges', 'pears', 'apricots']
change = [1, 'pennies', 2, 'dimes', 3, 'quarters']
# this first kind of for-Loop goes through an array
for number in the_count
puts "This is count #{number}"
end
for poop in the_count
def prompt()
print "> "
end
def gold_room()
puts "This room is full of gold. How much do you take?"
prompt; next_move = gets.chomp
if next_move.include? "0" or next_move.include? "1"
how_much = next_move.to_i()
root@command:~# puppet cert list
"dbadmin.entermarketing.com.com" (SHA256) 50:D3:7A:6F:13:05:FD:D5:6F:43:2B:E7:58:42:09:42:2E:45:5D:BD:C3:04:F1:64:52:F7:9D:A7:4C:76:87:AD
root@command:~# puppet cert clean dbadmin.entermarketing.com.com
Error: Could not find a serial number for dbadmin.entermarketing.com.com
Starting daemon: mcollective
root@s-app1:~# cat /var/log/mcollective.log
# Logfile created on Wed Jan 02 22:37:03 +0000 2013 by logger.rb/1.2.6
D, [2013-01-02T22:37:03.501509 #15885] DEBUG -- : pluginmanager.rb:167:in `loadclass' Loading Mcollective::Facts::Yaml_facts from mcollective/facts/yaml_facts.rb
D, [2013-01-02T22:37:03.524194 #15885] DEBUG -- : pluginmanager.rb:44:in `<<' Registering plugin facts_plugin with class MCollective::Facts::Yaml_facts single_instance: true
D, [2013-01-02T22:37:03.524390 #15885] DEBUG -- : pluginmanager.rb:167:in `loadclass' Loading Mcollective::Connector::Stomp from mcollective/connector/stomp.rb
D, [2013-01-02T22:37:03.525954 #15885] DEBUG -- : pluginmanager.rb:44:in `<<' Registering plugin connector_plugin with class MCollective::Connector::Stomp single_instance: true
D, [2013-01-02T22:37:03.526256 #15885] DEBUG -- : pluginmanager.rb:167:in `loadclass' Loading Mcollective::Security::Psk from mcollective/security/psk.rb
D, [2013-01-02T22:37:03.527834 #15885] DEBUG -- : p
# Logfile created on Wed Jan 02 22:56:28 +0000 2013 by logger.rb/1.2.6
D, [2013-01-02T22:56:28.965471 #15943] DEBUG -- : pluginmanager.rb:167:in `loadclass' Loading Mcollective::Facts::Yaml_facts from mcollective/facts/yaml_facts.rb
D, [2013-01-02T22:56:28.988565 #15943] DEBUG -- : pluginmanager.rb:44:in `<<' Registering plugin facts_plugin with class MCollective::Facts::Yaml_facts single_instance: true
D, [2013-01-02T22:56:28.988749 #15943] DEBUG -- : pluginmanager.rb:167:in `loadclass' Loading Mcollective::Connector::Stomp from mcollective/connector/stomp.rb
D, [2013-01-02T22:56:28.990315 #15943] DEBUG -- : pluginmanager.rb:44:in `<<' Registering plugin connector_plugin with class MCollective::Connector::Stomp single_instance: true
D, [2013-01-02T22:56:28.990617 #15943] DEBUG -- : pluginmanager.rb:167:in `loadclass' Loading Mcollective::Security::Psk from mcollective/security/psk.rb
D, [2013-01-02T22:56:28.992213 #15943] DEBUG -- : pluginmanager.rb:44:in `<<' Registering plugin security_plugin with class MC
@big-samantha
big-samantha / gist:4439198
Created January 2, 2013 23:07
mco server.cfg
# Logfile created on Wed Jan 02 23:07:59 +0000 2013 by logger.rb/1.2.6 [0/433]
D, [2013-01-02T23:07:59.917459 #17379] DEBUG -- : pluginmanager.rb:167:in `loadclass' Loading Mcollective::Facts::Yaml_facts from mcollective/facts/yaml_facts.rb
D, [2013-01-02T23:07:59.940359 #17379] DEBUG -- : pluginmanager.rb:44:in `<<' Registering plugin facts_plugin with class MCollective::Facts::Yaml_facts single_instance: true
D, [2013-01-02T23:07:59.940545 #17379] DEBUG -- : pluginmanager.rb:167:in `loadclass' Loading Mcollective::Connector::Stomp from mcollective/connector/stomp.rb
D, [2013-01-02T23:07:59.942113 #17379] DEBUG -- : pluginmanager.rb:44:in `<<' Registering plugin connector_plugin with class MCollective::Connector::Stomp single_instance: true
D, [2013-01-02T23:07:59.942436 #17379] DEBUG -- : pluginmanager.rb:167:in `loadclass' Loading Mcollective::Security::Psk from mcollective/se