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
''' | |
@author Bommarito Consulting, LLC; http://bommaritollc.com/ | |
@date 20131029 | |
This script monitors and logs to CSV the status of all tunnels for all VPNs for a single EC2 region. | |
''' | |
# Imports | |
import boto | |
import boto.ec2 | |
import boto.vpc |
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
import redis | |
r = redis.Redis() | |
base = 0 # Smallest allowed key in samples | |
jump = 50 # Key size bins | |
top = 1300 # Largest allowed key in sample | |
samples = 1000 # Numbers of samples | |
bins = [] | |
for i in xrange(1+(top-base)/jump): |
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
" http://vim.wikia.com/wiki/Example_vimrc: | |
set nocompatible | |
" load the pathogen bundle loader plugin | |
call pathogen#infect() | |
syntax on | |
filetype indent plugin on | |
" This is to standardize style across all our projects: | |
set shiftwidth=2 |
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
define breakage ($ensure="present") { | |
if $ensure == "absent" { | |
exec { "yum_remove_${name}": | |
command => "yum -y remove ${name}", | |
user => "root", | |
onlyif => "rpm -q ${name}", | |
} | |
} else { | |
package { "$name": | |
ensure => $ensure, |
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
# Dell Facter module | |
# | |
# Author: Mikael Fridh <mfridh@marinsoftware.com> | |
# Date: 2011-11-24 | |
# | |
# this is a rather substantial rewrite of the camptocamp puppet module | |
# https://github.com/camptocamp/puppet-dell | |
# | |
# The regex matching has been ripped out completely and replaced with | |
# some xpath expressions from Nokogiri. Unfortunately this means another |
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 | |
# Send privmsg (IRC notifications). | |
# Contacts a supybot-notify service, on a currently hardcoded host and port, | |
# and sends either the message sent as a parameter, or pipes everything from | |
# standard input | |
# | |
# Author: Mikael Fridh <mfridh@marinsoftware.com> | |
# Copyright (c) 2012 Marin Software | |
# |
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
# clean known host key of a certain host. | |
# attempts reverse dns lookup. | |
# requires dig | |
if [ -z "$1" ]; then | |
echo "Usage: ssh-clean hostname" | |
return | |
fi | |
arg=${1#*@} | |
echo "Cleaning for $arg..." |
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 my_dhcp::example { | |
$subnets = { | |
'the main subnet' => { | |
network => '10.0.0.0', | |
netmask => '255.255.255.0', | |
gateway => '10.0.0.1', | |
domain => 'example.com', | |
parameters => [ ], | |
pools => { |
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
/* copy ipaddress facts onto the hosts where the old IPs were 10.100.* and the new IPs are now 10.6* */ | |
update hosts h | |
join | |
fact_values fv ON (h.id = fv.host_id) | |
join fact_names fn ON (fv.fact_name_id = fn.id) | |
set h.ip=fv.value | |
where | |
h.ip LIKE '10.100.%' fn.name='ipaddress' | |
AND fv.value LIKE '10.6%'; |
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
#!/bin/bash | |
# | |
# IRC notification post-receive hook. | |
# Based on https://wiki.icinga.org/display/community/GIT+Commit+Bot | |
# | |
# Author: Mikael Fridh <frimik@gmail.com> | |
# | |
# This script pulls out the commit information and sends it to | |
# the Notify plugin in supybot via localhost 5050. | |
# |
OlderNewer