Skip to content

Instantly share code, notes, and snippets.

Parameters:
SubnetId:
Type: AWS::EC2::Subnet::Id
Description: "The list of SubnetIds, for at least two Availability Zones in the region in your Virtual Private Cloud (VPC)"
Default: "subnet-xxxxx"
AvailabilityZone:
Type: AWS::EC2::AvailabilityZone::Name
Description: "The availability zone to use. You may want to change this to find an AZ with the appropriate capacity."
Default: "us-gov-west-1a"
ImageId:
### Keybase proof
I hereby claim:
* I am robnolen on github.
* I am mehfisto (https://keybase.io/mehfisto) on keybase.
* I have a public key whose fingerprint is 6E51 E551 52A6 3E21 2A69 2F35 D97A 06A8 592E EF53
To claim this, I am signing this object:
@robnolen
robnolen / auditor.yaml
Created January 11, 2018 23:57
CloudFormation template to create Security auditor role
AWSTemplateFormatVersion: 2010-09-09
Description: This template creates a role that provides permissions to a specific account/iam user to access audit features
Parameters:
UserARNS:
Type: CommaDelimitedList
Default: "arn1,arn2,arn3"
Description: "Provide a comma delimited list of ARNs for users that you want to assume the role. (arn:aws:iam::123456789012:user/testuser)"
Resources:
import boto3
bucketname = "<BUCKET_NAME>"
s3 = boto3.resource('s3')
bucket = s3.Bucket(bucketname)
client = boto3.client('s3')
for obj in bucket.objects.all():
file {'c:/fix_winrm.ps1':
ensure => present,
source => 'puppet://puppet.convention.con/modules/fix_winrm/fix_winrm.ps1'
owner => 'Administrator',
group => 'Administrators',
mode => 0770,
}
exec {'fix_winrm':
command => 'cmd /c C:\Windows\System32\WindowsPowerShell\v1.0\PowerShell.exe -ExecutionPolicy Unrestricted c:\fix_winrm.ps1'
@robnolen
robnolen / gist:2469302
Created April 23, 2012 07:09
CS 36 C Final Output
[iceberg@oh ~]$ more output1.txt
Please enter a stock name, or zero to end: Stock name is Clippers
Please enter a number of shares: Please enter the buy price: Please enter the current price: Please enter the fees:
Please enter a stock name, or zero to end: Stock name is Spurs
Please enter a number of shares: Please enter the buy price: Please enter the current price: Please enter the fees:
Please enter a stock name, or zero to end: Stock name is Lakers
Please enter a number of shares: Please enter the buy price: Please enter the current price: Please enter the fees:
Please enter a stock name, or zero to end: Stock name is Celtics
Please enter a number of shares: Please enter the buy price: Please enter the current price: Please enter the fees:
trees
linked data structure - most used linked lists
* - root
/ \
child * * child ← depth 1
/ \
@robnolen
robnolen / gist:1709282
Created January 31, 2012 06:48
Stringstream example
#include <iostream>
#include <sstream>
#include <string>
using namespace std;
int main() {
string line;
string temp;
stringstream stream; //our stringstream
//
// main.cpp
// StringStream
//
// Created by Robert Nolen on 11/20/11.
// Copyright 2011 Greencrayon.org. All rights reserved.
//
#include <iostream>
#include <string>
class Foo
{
public:
int bar;
Foo();
~Foo();
}
int main()