Skip to content

Instantly share code, notes, and snippets.

darylounet / nat-ha-2020.yaml
Created November 15, 2020 16:26
AWS NAT HA with IPv6, Amazon Linux 2 and using aws-cli instead of deprecated apitools. Compatible with t4g Arm64 instances.
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
joostrijneveld /
Created May 20, 2014 19:43
Producing printable QR codes for persistent storage of GPG private keys
# Heavily depends on:
# libqrencode (
# paperkey (
# zbar (
# 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
joemiller / pantheon-check-ping-endpionts.rb
Created June 18, 2013 15:56
a meta-check for sensu that creates many other checks
#!/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
glarizza / gist:3185860
Created July 27, 2012 02:27
User Declaration for OS X 10.7 and 10.8
$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,