This file contains hidden or 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
metrics: | |
prometheus: | |
handlerPath: /metrics | |
timerType: histogram | |
sanitization: prometheus | |
samplingRate: 1.0 | |
extended: detailed |
This file contains hidden or 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
# originally courtesy of https://gist.github.com/pkuczynski/8665367 | |
# note: only supports 2 space indented YAML. | |
# additions: | |
# - only set environment variable if not already set | |
# - uppercase parsed variables to avoid case sensitivity | |
parse_yaml() { | |
local prefix=$2 | |
local s='[[:space:]]*' w='[a-zA-Z0-9_]*' fs=$(echo @|tr @ '\034') | |
sed -ne "s|^\($s\)\($w\)$s:$s\"\(.*\)\"$s\$|\1$fs\2$fs\3|p" \ | |
-e "s|^\($s\)\($w\)$s:$s\(.*\)$s\$|\1$fs\2$fs\3|p" $1 | |
This file contains hidden or 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
package main | |
import ( | |
"fmt" | |
"sync" | |
"sync/atomic" | |
) | |
const ( | |
offset64 = 14695981039346656037 |
This file contains hidden or 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
package valuepack | |
import ( | |
"container/list" | |
"fmt" | |
) | |
type value struct { | |
metadata ValueMetadata | |
elem interface{} |
This file contains hidden or 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
package main | |
import ( | |
"fmt" | |
) | |
type Options struct { | |
foo int | |
bar string | |
} |
This file contains hidden or 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
javascript:(function(){ window.addEventListener('keydown', function(e) {if (e.ctrlKey && e.keyCode == 13) { $('#compilerun').click(); }}); }()) |
This file contains hidden or 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 | |
#vim:syntax=ruby | |
# Most of this borrowed from: | |
# https://github.com/ripienaar/monitoring-scripts/blob/master/puppet/check_puppet.rb | |
# A simple nagios check that should be run as root | |
# perhaps under the mcollective NRPE plugin and | |
# can check when the last run was done of puppet. | |
# It can also check fail counts and skip machines | |
# that are not enabled |
This file contains hidden or 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
extension Dictionary { | |
func valueForKey<T>(key: Key) -> T? { | |
if let value = self[key] as? T { | |
return value | |
} else { | |
return nil | |
} | |
} | |
} |
This file contains hidden or 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 coffee | |
readline = require 'readline' | |
rl = readline.createInterface | |
input: process.stdin | |
terminal: false | |
stat = {add: 0, del: 0} |