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 | |
# | |
# Return the subnets used by Google Services | |
# | |
# There are a growing number of netblocks, 2,3,4,5,6,7, etc... | |
# Dig them all until an empty string is returned. | |
txt="$(dig TXT _netblocks.google.com +short @8.8.8.8)" | |
idx=2 | |
while [[ -n "${txt}" ]]; do | |
echo "$txt" | tr '[:space:]+' "\n" | grep : | cut -d: -f2- |
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 | |
## NOTE: | |
## This script requires the follwing in /etc/hosts: | |
## 127.0.0.2 puppet master1.example.org | |
# This will fail with a stock puppet 3.1.1, but will succeed if all of the | |
# certificate subjects contain only the "CN" portion, and no O, OU, or | |
# emailAddress. |
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
# vim: syntax=ruby | |
require 'bluecloth' | |
require 'erb' | |
outputs = [] | |
FileList['examples/*'].each do |input| | |
output = File.join("output", File.basename(input)).sub(/\.\w+/, ".html") | |
outputs << output |
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
# Recursively diff two hashes, showing only the differing values. | |
# By Henrik Nyh <http://henrik.nyh.se> 2009-07-14 under the MIT license. | |
# | |
# Example: | |
# | |
# a = { | |
# "same" => "same", | |
# "diff" => "a", | |
# "only a" => "a", | |
# "nest" => { |