I hereby claim:
- I am andrewalexander on github.
- I am andrewalexander (https://keybase.io/andrewalexander) on keybase.
- I have a public key ASArUoExqjMiH4iLnYFtEAr2ZvCMVtCnEvNcu4OvbvbrYAo
To claim this, I am signing this object:
| #2B2B2B,#323232,#CC7832,#FFFFFF,#323232,#8C8C8C,#629755,#AE8ABE |
| package main | |
| import ( | |
| "bytes" | |
| "fmt" | |
| "strings" | |
| ) | |
| func main() { | |
| guy := "this is why we can't have nice things" |
| policies: | |
| - name: ec2-invalid-sg-report | |
| resource: ec2 | |
| description: | | |
| Find all EC2 instances that are using soon-to-be-deprecated SGs | |
| filters: | |
| - type: value | |
| key: tag:ApplicationGroup | |
| value: ANDREWSTESTAPPLICATIONGROUP |
| // dependencies | |
| var async = require('async'); | |
| var AWS = require('aws-sdk'); | |
| var gm = require('gm') | |
| .subClass({ imageMagick: true }); // Enable ImageMagick integration. | |
| var util = require('util'); | |
| // constants | |
| var MAX_WIDTH = 100; | |
| var MAX_HEIGHT = 100; |
| import os | |
| import uuid | |
| from c7n.policy import load | |
| from c7n.resources import load_resources | |
| from c7n.utils import Bag, yaml_load | |
| def convert_sg_to_describe(event): | |
| # convert CFT event to the format custodian expects (describe_security_groups) | |
| # TODO: want some kind of schema validation for the event |
| import boto3 | |
| from botocore.exceptions import ClientError | |
| client = boto3.client('ec2') | |
| # Create VPC for testing | |
| vpc_id = client.create_vpc(CidrBlock="10.42.0.0/16")['Vpc']['VpcId'] | |
| # Create SG | |
| sg_id = client.create_security_group( | |
| GroupName="egress-test", | |
| VpcId=vpc_id, |
I hereby claim:
To claim this, I am signing this object:
| # Auto blocking ads, malware, etc on EdgeOS/VyOS | |
| # | |
| # Blatant rip-off/integration of https://gist.github.com/OnlyInAmerica/75e200886e02e7562fa1 | |
| # and http://www.bsdnow.tv/tutorials/dnsmasq | |
| # any requests to blocked domains will instead route here | |
| pixelserv_ip="10.0.0.1" | |
| final_list='/etc/dnsmasq.d/dnsmasq.adlist.conf' | |
| tmp_list="$final_list.tmp" |