This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import boto3 | |
import json | |
client = boto3.client('iam') | |
paginator = client.get_paginator('list_policies') | |
response_iterator = paginator.paginate(Scope='AWS') | |
managed_policies = [] | |
for response in response_iterator: | |
for policy in response['Policies']: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Attempt to remove a VPC by removing the minimum resources required first. | |
Defaults to removing all default vpcs in all regions. | |
""" | |
import logging | |
import boto3 | |
logging.basicConfig(level = logging.INFO) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AWSTemplateFormatVersion: '2010-09-09' | |
Description: Template to create libnd EC2 | |
Conditions: | |
HasNetworkInterfaceId: !Not [!Equals [!Ref NetworkInterfaceId, '']] | |
HasPrivateIpAddress: !Not [!Equals [!Ref PrivateIpAddress, '']] | |
Parameters: | |
AMI: | |
ConstraintDescription: must be an AMI available in the EC2 instance's region | |
Default: ami-6869aa05 | |
Description: Base AMI |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AWSTemplateFormatVersion: '2010-09-09' | |
Description: Create a Volume from scratch and attach it to an instance. | |
Metadata: | |
AWS::CloudFormation::Interface: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"universityarchives": "5561", | |
"reservesmicrotextandmediadesk": "5557", | |
"medievalinstitutelibrary": "5558", | |
"circulationservicedesk": "1483", | |
"engineeringlibrary": "5566", | |
"architecturelibrary": "5563", | |
"kelloggkroclibrary": "5567", | |
"mahaffeybusinesslibrary": "5564", | |
"chemistryphysicslibrary": "5565", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
""" local codebuild implementation | |
Parses buildspec.yml files, and executes them locally, as per: | |
http://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html#build-spec-ref-example | |
""" | |
from __future__ import print_function | |
import functools | |
import glob | |
import os |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
from __future__ import print_function | |
import argparse | |
import contextlib | |
import functools | |
import json | |
import os | |
import sys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
""" local codebuild implementation | |
Parses buildspec.yml files, and executes them locally, as per: | |
http://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html#build-spec-ref-example | |
""" | |
from __future__ import print_function | |
import argparse | |
import contextlib | |
import functools |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' newbase60.py - Python implementation of Tantek's NewBase60 | |
http://ttk.me/w/NewBase60 | |
by Sean Summers <seansummers@gmail.com> | |
License: https://creativecommons.org/licenses/by/4.0/ | |
''' | |
import functools | |
import itertools | |
import string | |
AMBIGUOUS_CHARACTERS = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
ssh_key=$(cut -f2 -d\ /etc/ssh/ssh_host_ed25519_key.pub) | |
document=$(curl -s http://169.254.169.254:/latest/dynamic/instance-identity/document |base64 -w 0) | |
signature=$(curl -s http://169.254.169.254:/latest/dynamic/instance-identity/signature |tr -d '\n') | |
curl -s http://169.254.169.254/latest/dynamic/instance-identity/signature |base64 -d |openssl rsautl -verify -inkey AWS.rsa -certin | |
""" | |
import json | |
from os import environ |