Skip to content

Instantly share code, notes, and snippets.

View adhorn's full-sized avatar

Adrian Hornsby adhorn

View GitHub Profile
Incident date:
Peer-review committee:
Supporting data:
Customer Impact:
Incident Response Analysis:
Post-Incident Analysis:
adhorn / stop_random_instance_api.yml
Created June 1, 2020 12:55
Randomly stop EC2 instances using SSM Automation
description: Stop instances in a particular AZ with tag filter
schemaVersion: '0.3'
assumeRole: "{{ AutomationAssumeRole }}"
type: String
description: "(Required) The Availability Zone to impact"
type: String
adhorn / nginx.conf
Last active January 3, 2024 03:09 — forked from mikhailov/gist:9639593
Nginx S3/Unicorn Proxy with backend keep alive
# The Nginx configuration based on
http {
ssl_certificate server.crt;
ssl_certificate_key server.key;
ssl_session_timeout 15m;
ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:10m;
adhorn / gist:4659eb98428c83726ad4ff2ea19a27f9
Created April 8, 2020 05:35
IAM role - SSM Run (Send) Command
"Version": "2012-10-17",
"Statement": [
"Effect": "Allow",
"Action": [
adhorn /
Created February 21, 2022 14:21 — forked from ZuZuD/
Simulate an ephemeral port exhaustion on a Linux client.
import socket
import time
import argparse
import subprocess
import shlex
Usage: python3 <dst> <dport> <optional:loop>
Example: python3 80
Help: --help
adhorn / env_us-east-1.yml
Created May 3, 2018 12:08
Serverless framework to support deploy Lambda Functions in VPC
lambdaExecSecurityGroups: ["sg-xxxxxxx"]
subnets: ["subnet-xxxxxxx"]
adhorn / gist:997496feec26f217011e085a0f9fbc5c
Created April 24, 2018 07:13
Create DynamoDB Global Tables
#create the initial table with stream enabled (here in Ireland)
aws dynamodb create-table \
--table-name MyGlobalTable \
--attribute-definitions \
AttributeName=item_id,AttributeType=S \
--key-schema \
AttributeName=item_id,KeyType=HASH \
--provisioned-throughput \
ReadCapacityUnits=5,WriteCapacityUnits=5 \
--stream-specification StreamEnabled=true,StreamViewType=NEW_AND_OLD_IMAGES \
adhorn / gist:11cd47b215547a413e825ce7c506c6ba
Created April 29, 2021 06:09 — forked from jacksonfdam/gist:3000275
Regular Expressions List
//Regular Expressions List
//Short Tutorial
\ // the escape character - used to find an instance of a metacharacter like a period, brackets, etc.
. // match any character except newline
x // match any instance of x
^x // match any character except x
[x] // match any instance of x in the bracketed range - [abxyz] will match any instance of a, b, x, y, or z
| // an OR operator - [x|y] will match an instance of x or y
adhorn / gist:c315cb13331528b09f39a592344ec7cb
Created April 22, 2020 14:05
Chaos Toolkit experiment to stop docker locally
"version": "1.0.0",
"title": "What is the impact of an terminating the database master",
"description": "terminating the master database should not prevent the application from running",
"tags": ["db"],
"configuration": {
"endpoint_url": {
"type": "env",
"key": "ELEANOR_URL"