Skip to content

Instantly share code, notes, and snippets.

@bo67192
bo67192 / opsworkscft.json
Created November 2, 2016 02:35
Example Cloudformation template to create opsworks stack
{
"AWSTemplateFormatVersion": "2010-09-09",
"Metadata": {
"AWS::CloudFormation::Designer": {
"d44d7b48-13cf-47fc-b755-39115ba78fff": {
"size": {
"width": 310,
"height": 300
},
"position": {
@bo67192
bo67192 / cftparameterreferencesnippet.json
Created November 2, 2016 02:16
Cloudformation Template Parameter Reference
"SubnetId": {
"Fn::FindInMap": [
"Subnet",
"Environment",
{
"Ref": "Environment"
}]
}
@bo67192
bo67192 / cftmappingsnippet.json
Created November 2, 2016 02:15
Cloudformation Template Mapping Snippet
"Mappings": {
"Subnet": {
"Environment": {
"Test": "subnet-2udye763",
"Prod": "subnet-jd83udjed"
}
}
@bo67192
bo67192 / cftparametersnippet.json
Created November 2, 2016 02:12
Cloudformation Template Parameter Snippet
"Parameters": {
"EnvironmentParameter": {
"Type": "String",
"Default": "Prod",
"AllowedValues": [
"Test",
"Prod"
],
"Description": "Enter the environment you are deploying your stack into"
}
@bo67192
bo67192 / SessionParser
Created May 5, 2014 02:22
Script to search for Heartbleed session hijacks in a VPN Log
class SessionParser {
static void main(String[] args) {
def users = [:]
def records = new File(/vpn.txt/) // VPN log file
records.eachLine {record ->
if (record ==~ /.*Full_Tunnel.*/) { // Use this regex to catch lines you know will be interesting
def userMatcher = record =~ /userName/ // Write a regex to catch the username