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
require "rubygems" | |
require "ffi" | |
# class for grok_t | |
# Attributes with '__' prefixes are not for your consumption; they | |
# are internal to libgrok. | |
class Grok < FFI::Struct | |
# Use FFI to hook libgrok, expose so Grok class can use it. | |
module CGrok | |
extend FFI::Library |
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
% jruby jruby-instrument-printstream.rb | |
enter Java::JavaIo::PrintStream#println(["Testing"]) | |
Testing | |
exit Java::JavaIo::PrintStream#println(["Testing"]) |
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
VERSION=5.4.1 | |
DOWNLOAD=http://apache.cs.utah.edu/activemq/apache-activemq/$(VERSION)/apache-activemq-$(VERSION)-bin.tar.gz | |
NAME=apache-activemq | |
TARBALL=$(NAME)-$(VERSION)-bin.tar.gz | |
BUILDDEPS= | |
RUNDEPS=java-runtime | |
#CFLAGS=-g | |
.PHONY: default |
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
Feature: solrserver remote health | |
In order to remotely ensure a healthy solrserver | |
As a client talking to the solrserver | |
I want to ensure solrserver is responsive | |
Scenario: Check the status of solrserver | |
Given a dns name of "solr" | |
And requests timeout after 2 seconds | |
When I fetch "http://solr:8983/solr/admin/cores?action=status" for each dns entry | |
Then there should be no timeouts |
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
if !String.instance_methods.include?("start_with?") | |
class String | |
def start_with?(str) | |
return self[0 .. (str.length-1)] == str | |
end | |
end | |
end |
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
snack(~/projects/mpf/ragel) % ruby mpf.rb test.mpf | |
{ | |
"pants" => [ | |
[0] [ | |
[0] "\"foo\"", | |
[1] [ | |
[0] { | |
"fizzle" => [ | |
[0] "33" | |
] |
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
snack(~) % ruby as.rb | |
>> Thin web server (v1.2.7 codename No Hup) | |
>> Maximum connections set to 1024 | |
>> Listening on 0.0.0.0:8080, CTRL+C to stop |
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
node default { | |
tag("deployment::$deployment") | |
include truth::enforcer | |
case $operatingsystem { | |
"Ubuntu": { include os::ubuntu } | |
default: { err("Unsupported operatingsystem: '$operatingsystem'") } | |
} | |
exec { |
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
% puppet apply --storeconfig --dblocation /tmp/puppet.sqlite testpuppet.rb | |
#<Puppet::Rails::Resource id: 13, title: "/tmp/x", restype: "File", host_id: 1, source_file_id: 1, exported: true, line: 1, updated_at: "2010-12-09 13:13:03", created_at: "2010-12-09 13:13:03"> |
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
FACTER_fqdn=host1 puppet --certname host1 --node_name fqdn --storeconfigs --dblocation /tmp/puppet.sqlite -e '@@nagios_hostgroup { "mygroup": notes => "Hello"; }' | |
FACTER_fqdn=host2 puppet --certname host2 --node_name fqdn --storeconfigs --dblocation /tmp/puppet.sqlite -e '@@nagios_hostgroup { "mygroup": notes => "Hello"; }' |