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
curl -H 'Accept: application/json' http://<puppetdb>:8080/v2/metrics/mbean/com.puppetlabs.puppetdb.command%3Atype%3Dglobal%2Cname%3Dprocessing-time | |
/v2/metrics/mbean/com.puppetlabs.puppetdb.scf.storage%3Atype%3Ddefault%2Cname%3Dgc-catalogs-time | |
/v2/metrics/mbean/com.puppetlabs.puppetdb.scf.storage%3Atype%3Ddefault%2Cname%3Dgc-params-time | |
/v2/metrics/mbean/com.puppetlabs.puppetdb.scf.storage%3Atype%3Ddefault%2Cname%3Dreplace-catalog-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
class print_result($result,$input){ | |
$answer = $result ? { | |
s1 => even, | |
s2 => odd, | |
} | |
notify { "The input $input is $answer": } | |
} | |
define dfa($state,$original_input,$input,$rules,$callback) { | |
$first = inline_template("<%= input[0] %>") |
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
{ | |
"command": "deactivate node", | |
"payload": "\"the_node_name\"", | |
"version": 1 | |
} |
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
$topscope_array = ['a'] | |
$topscope_string = 'a' | |
node default { | |
$array = ['a'] | |
$string = 'a' | |
include foo | |
notify { "node array is $array (should be a)": } | |
notify { "node string is $string (should be a)": } | |
} |
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
diff --git a/lib/puppet/node/environment.rb b/lib/puppet/node/environment.rb | |
index fc36c35..be04a90 100644 | |
--- a/lib/puppet/node/environment.rb | |
+++ b/lib/puppet/node/environment.rb | |
@@ -57,6 +57,7 @@ class Puppet::Node::Environment | |
def self.clear | |
@seen.clear | |
+ self.current = nil | |
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
RubyFileStat.java:365:in `cmp': java.lang.ClassCastException: org.jruby.RubySymbol cannot be cast to org.jruby.RubyFileStat | |
from RubyFileStat$i$1$0$cmp.gen:65535:in `call' | |
from RuntimeHelpers.java:2513:in `invokedynamic' | |
from RubyComparable.java:117:in `callCmpMethod' | |
from RubyComparable.java:103:in `op_equal' | |
from RubyComparable$s$1$0$op_equal.gen:65535:in `call' | |
from CachingCallSite.java:312:in `cacheAndCall' | |
from CachingCallSite.java:169:in `call' | |
from EqCallSite.java:37:in `call' | |
from CallOneArgNode.java:57:in `interpret' |
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 | |
specs_in_order = File.read('spec_order').split | |
failing_spec = ARGV.first | |
specs = specs_in_order[0...specs_in_order.index(failing_spec)] | |
suspects = specs |
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 | |
if size_opt = ARGV.index('-s') | |
seed = ARGV[size_opt+1] | |
end | |
seed ||= Time.now.to_i | |
if clip_opt = ARGV.index('-c') | |
begin |
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
((file /etc/apache2/apache2.conf | |
(ensure file) | |
(source puppet:///modules/apache/apache2.conf) | |
(notify | |
(service apache | |
(ensure running) | |
(enable true) | |
(require | |
(package apache | |
(ensure latest))))))) |
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 'net/http' | |
require 'uri' | |
require 'rubygems' | |
require 'atom' | |
# Light lava lamps based on Jenkins build status RSS feed | |
# Green lamp lights if all builds are good; | |
# Red lamp lights if any build fails. | |
# |