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
for f in $(find $1 -iname "*.wsp"); do | |
if [ -a $f ]; | |
then /opt/graphite/bin/whisper-set-aggregation-method.py $f max; | |
fi; | |
done |
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
require 'resolv' | |
class DnsCheck | |
attr_reader :host | |
def initialize(host) | |
@host = host | |
end | |
def a | |
@a ||= Resolv::DNS.new.getresources(host, Resolv::DNS::Resource::IN::A) |
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
class CircleQueue | |
include Enumerable | |
class Head | |
attr_accessor :first, :last | |
def initialize | |
self.first = self | |
self.last = self | |
end |
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
# shows how to use the Ruby AWS SDK to list EC2 instance IDs | |
# when your API credentials have been placed under MFA requirements | |
# Prerequisites: | |
# you are running on a host that already has the AWS CLI set up with an IAM key pair | |
# that can describe EC2 instances (OTHERWISE, just pass a | |
# secret_access_id / secret_access_key pair to the STS client initializer) | |
# You have installed the Ruby AWS SDK Gem | |
# http://aws.amazon.com/sdk-for-ruby/ |
NewerOlder