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
$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
{ | |
"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
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
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
["and", | |
["=", "type", "Package"], | |
["?:", | |
["in", "certname", | |
["extract", "certname", | |
["select-facts", | |
["and", ["=", "name", "kernelrelease"], ["=", "value", "3.2.0-3-amd64"]]]]] | |
["=", "title", "linux-headers-3.2.0-3-amd64"], | |
["=", "title", "linux-headers-3.2.0-2-amd64"]]] |
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
SELECT nspname || '.' || relname AS "relation", | |
pg_size_pretty(pg_relation_size(C.oid)) AS "size" | |
FROM pg_class C | |
LEFT JOIN pg_namespace N ON (N.oid = C.relnamespace) | |
WHERE nspname NOT IN ('pg_catalog', 'information_schema') | |
ORDER BY pg_relation_size(C.oid) DESC | |
LIMIT 20; |
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
ei! | |
tsathoggua | |
r'lyeh | |
in his house at r'lyeh dead cthulhu waits dreaming. | |
ph'nglui mglw'nafh cthulhu r'lyeh wgah'nagl fhtagn. | |
yuggoth | |
yoyodyne | |
cthulhu fhtagn! | |
ia! ia! | |
yogsothoth |
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 'json' | |
raise "Specify at least one epic" if ARGV.empty? | |
def make_request(client, url) | |
request = Net::HTTP::Get.new(url) | |
request.basic_auth ENV['JIRA_USERNAME'], ENV['JIRA_PASSWORD'] |
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
WITH inactive_nodes | |
AS (SELECT certname | |
FROM certnames | |
WHERE ( deactivated IS NOT NULL | |
OR expired IS NOT NULL )) | |
SELECT reports.certname AS certname, | |
Encode(reports.hash :: bytea, 'hex') AS hash, | |
reports.end_time AS end_time, | |
reports.noop AS noop, | |
report_statuses.status AS status, |