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 | |
require 'octokit' | |
require 'optparse' | |
require 'terminal-table' | |
require 'io/console' | |
def yesno | |
case $stdin.getch.downcase | |
when "Y".downcase then true |
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 python | |
import sys | |
import holidays | |
from datetime import date | |
sys.exit(date.today() not in holidays.England()) |
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
function decode-authorization-failure-message { | |
if [ $# -ne 1 ] || [ "$1" = -h ] || [ "$1" = --help ]; then | |
cat <<'EOT' | |
Usage: decode-authorization-failure-message <message> | |
Use this when Amazon gives you an "Encoded authorization failure message" and | |
you need to turn it into something readable. | |
EOT | |
return 1 | |
fi |
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
# This file is managed by Puppet. Manual changes will be destroyed. | |
# A naively simple config to cache items for <%= @cache_ttl %> and serve stale objects | |
# for up to <%= @grace_ttl %> on backend outage (data reload) | |
vcl 4.0; | |
# Default backend definition. | |
backend default { | |
.host = "127.0.0.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
Match exec "ping -q -c 1 -t 1 %n | grep ' (127\.\| (10\.\| (172\.16\.\| (172\.17\.\| (172\.18\.\| (172\.19\.\| (172\.20\.\| (172\.21\.\| (172\.22\.\| (172\.23\.\| (172\.24\.\| (172\.25\.\| (172\.26\.\| (172\.27\.\| (172\.28\.\| (172\.29\.\| (172\.30\.\| (172\.31\.\| (192\.168\.'" | |
StrictHostKeyChecking no | |
UserKnownHostsFile /dev/null |
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 | |
require 'librarian/puppet' | |
lockfile = Librarian::Puppet::Lockfile.new( | |
Librarian::Puppet::Environment.new, 'Puppetfile.lock' | |
) | |
puppet_modules = {} |
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
# Pre-requisite | |
pip install pygments | |
cat << EOF > ~/.lessfilter | |
#!/bin/sh | |
case "$1" in | |
*.awk|*.groff|*.java|*.js|*.m4|*.php|*.pl|*.pm|*.pod|*.sh|\ | |
*.ad[asb]|*.asm|*.inc|*.[ch]|*.[ch]pp|*.[ch]xx|*.cc|*.hh|\ | |
*.lsp|*.l|*.pas|*.p|*.xml|*.xps|*.xsl|*.axp|*.ppd|*.pov|\ | |
*.diff|*.patch|*.py|*.rb|*.sql|*.ebuild|*.eclass) |
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
#!/bin/bash | |
set -e | |
echo "Started running at: $(date '+%Y-%m-%d %H:%M:%S %:z')" | |
if [[ ! `bundle show puppet | grep "puppet-5"` ]]; then | |
export PUPPET_VERSION=5.3.3 | |
fi | |
source ~/.github |
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
# It's been proven that password length is more important than complexity. | |
# For humans aLongPhraseLikeThis1 is more secure than an 8 character password. | |
# Generating a 64 character random character string on command line: | |
cat /dev/urandom | tr -dc 'a-zA-Z0-9._~()!*:@,;+?-' | fold -w 64 | head -n 1 | |
# Because we probably use eyaml to encrypt the value, we don't ever need to know it: | |
eyaml encrypt --string=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9._~()!*:@,;+?-' | fold -w 64 | head -n 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
#!/usr/bin/env bash | |
scheduleid=XXXXXX | |
apikey=XXXXXXXXXXXXXXXXXX | |
# No need to edit below | |
touch ~/.on_call | |
blue=`tput setaf 4` | |
reset=`tput sgr0` | |
today=$(date +'%Y-%m-%d')T09:00:00Z |
NewerOlder