View nat-ha-2020.yaml
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
AWSTemplateFormatVersion: 2010-09-09 | |
Description: >- | |
NAT HA: creates two NAT nodes in a new | |
VPC in a hot/hot NAT configuration. After successfully launching this | |
CloudFormation stack, you will have 4 subnets in 2 AZs (a pair of | |
public/private subnets in each AZ), with NAT instances routing outbound | |
traffic for their respective private subnets. The NAT instances will | |
automatically monitor each other and fix outbound routing problems if the | |
other instance is unavailable. | |
Based on https://aws.amazon.com/fr/articles/high-availability-for-amazon-vpc-nat-instances-using-aws-cloudformation-templates/ |
View gpg2qrcodes.sh
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
# Heavily depends on: | |
# libqrencode (fukuchi.org/works/qrencode/) | |
# paperkey (jabberwocky.com/software/paperkey/) | |
# zbar (zbar.sourceforge.net) | |
# Producing the QR codes: | |
# Split over 4 codes to ensure the data per image is not too large. | |
gpg --export-secret-key KEYIDGOESHERE | paperkey --output-type raw | base64 > temp | |
split temp -n 4 IMG | |
for f in IMG*; do cat $f | qrencode -o $f.png; done |
View pantheon-check-ping-endpionts.rb
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 | |
# | |
# this is a special meta-check. It runs ping checks against all hosts in | |
# the /endpoints API and sends individual results directly to sensu-client via | |
# the udp/3030 client socket. this is different from the normal sensu check model | |
# where individual scripts run and their exit status and output is used to create | |
# a single event. | |
# | |
# the reason for this check is to be able to dynamically ping a list of hosts | |
# without the race conditions and timing issues involved with creating individual |
View gist:3185860
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
$password = $macosx_productversion_major ? { | |
'10.7' => 'aaa6c1f945132d2599079fe90c9d20e608e607344b86328c1ef8ad8dc820c1bb5a31fd816b8ae546fed6dcf58ff023794f8250a66935d6d0687b737f24aae2ed', | |
'10.8' => '0590ade19e6953c135ae872ae77618235df7d46c63de7f9a0fcdf2cd9e7d85e4b7ca868101235b6158e05a309805ee4814b027a4be9c23ec2926bc8172269affba5c9a5985e81091fa6898076d297f1faa75fa617551ef1671d7520055c4a0d97b9b9c5805aa322baedbcd8ee9c523811653ac2ea9e9c8d8f1ac519a0f2b595e', | |
default => 'SHA1 Style 10.5 and 10.6 Hash', | |
} | |
user { 'test': | |
ensure => present, | |
uid => '550', | |
password => $password, |