Skip to content

Instantly share code, notes, and snippets.

View bodsch's full-sized avatar

Bodo Schulz bodsch

View GitHub Profile
@bodsch
bodsch / mass-aggregation-change.sh
Created January 26, 2018 15:07 — forked from kirbysayshi/mass-aggregation-change.sh
quick examples of how to change many many wsp (graphite/whisper) files settings
for f in $(find $1 -iname "*.wsp"); do
if [ -a $f ];
then /opt/graphite/bin/whisper-set-aggregation-method.py $f max;
fi;
done
@bodsch
bodsch / dns_check.rb
Created January 21, 2018 09:33 — forked from colszowka/dns_check.rb
Ruby DNS Check
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)
@bodsch
bodsch / cirqle_queue_and_fifo.rb
Created December 11, 2017 13:16 — forked from prepor/cirqle_queue_and_fifo.rb
Simple ruby implementation of Cirqle Queue and FIFO
class CircleQueue
include Enumerable
class Head
attr_accessor :first, :last
def initialize
self.first = self
self.last = self
end
@bodsch
bodsch / gist:e02534f6417b44d80a05c41dd225023a
Created May 10, 2017 13:40 — forked from brandonrich/gist:67c0ae24b5abfef65134
Ruby AWS SDK v2 IAM user MFA example
# 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/