This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'mysql' | |
require 'yaml' | |
require 'optparse' | |
def parse argv | |
env = {:path => 'check_repli.yml'} | |
env[:path] = ENV['CHECK_REPLI_CONFIG'] if ENV.include? 'CHECK_REPLI_CONFIG' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby1.9.1 | |
# Nagios plugin that looks for some JSON or summat. | |
require 'json' | |
require 'net/http' | |
require 'uri' | |
require 'optparse' | |
@options = {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module MCollective | |
module Agent | |
class agentreload<RPC::Agent | |
action 'reload' do | |
reload | |
end | |
private | |
def reload |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2011-06-14T18:20:49.00000+02:00 [hostname.here] mcollectived[7774]: agents.rb:126:in `dispatch' Execution of test failed: Could not create instance of plugin test_agent: /usr/lib/ruby/1.8/mcollective/rpc/ddl.rb:46:in `initialize': (eval):57:in `initialize': compile error | |
2011-06-14T18:20:49.00000+02:00 [hostname.here] mcollectived[7774]: agents.rb:127:in `dispatch' /usr/lib/ruby/1.8/mcollective/pluginmanager.rb:69:in `[]' | |
2011-06-14T18:20:49.92722+02:00 [hostname.here] /usr/lib/ruby/1.8/mcollective/agents.rb: 103:in `timeout' | |
2011-06-14T18:20:49.92722+02:00 [hostname.here] /usr/lib/ruby/1.8/mcollective/agents.rb: 113:in `dispatch' | |
2011-06-14T18:20:49.92722+02:00 [hostname.here] /usr/lib/ruby/1.8/mcollective/agents.rb: 111:in `initialize' | |
2011-06-14T18:20:49.92722+02:00 [hostname.here] /usr/lib/ruby/1.8/mcollective/agents.rb: 111:in `new' | |
2011-06-14T18:20:49.92722+02:00 [hostname.here] /usr/lib/ruby/1.8/mcollective/agents.rb: 111:in `dispatch' | |
2011-06-14T18:20:49.92722+02:00 [hostname.here] /usr/li |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
metadata :name => 'Foo', | |
:description => 'foo foo foo', | |
:author => '[email protected]', | |
:license => 'other', | |
:version => '0.1', | |
:url => 'none', | |
:timeout => 30 | |
action 'go', :description => 'waits for X seconds' do | |
input :time, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Day job: System Administration (with Devops tendencies). | |
What is your language of choice: Ruby (recently), Perl (traditionally). | |
Open Source contributions: Lots of little scripts, plugins, and so forth over the years. | |
How do you use GitHub: Handy way to maintain and distribute my modest contributions to the OSS community. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
OLD=`rvm current` | |
source "$HOME/.rvm/scripts/rvm" | |
rvm use 1.8.7 | |
gem list --local | |
puppet parser validate $1 | |
puppet-lint $1 | |
rvm use $OLD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cat sortme | |
1234 | |
abcd | |
ABCD | |
*** | |
::: | |
debian$ cat sortme | sort | |
::: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Shamelessly based on https://gist.github.com/844735 | |
define apt::key ( | |
$keyserv, | |
$ensure = present | |
) { | |
$grep_for_key = "apt-key finger | grep fingerprint | awk '{print \$10 \$11 \$12 \$13}' | grep '${name}'" | |
case $ensure { | |
present: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ "x$1" == 'x' ]; then | |
echo "USAGE: $0 '<password>'" | |
exit 1 | |
fi | |
# Get an md5sum of the string for eventual extraction. | |
md5=$( echo $1 | md5sum ) | |
extract="${md5:2:8}" |
OlderNewer