Skip to content

Instantly share code, notes, and snippets.

@atheiman
atheiman / template.yml
Last active October 18, 2024 18:03
aws-delete-all-organization-default-vpcs
Description: >-
Scheduled Lambda function to delete Default VPC from all accounts in the organization. Deploys an IAM role via
CloudFormation stackset to the organization root and schedules a Lambda function to assume the IAM roles in each
account and attempt to delete the Default VPCs in every Region. If any operation fails, or if a Default VPC is not
empty, or if a Default VPC has a peering connection, the function invocation fails.
Parameters:
OrgRootId:
Type: String
AllowedPattern: '^r-[a-zA-Z0-9]+$'
@malcolmgreaves
malcolmgreaves / git-largest-files
Last active August 19, 2024 03:12 — forked from nk9/largestFiles.py
Python script to find the largest files in a git repository.
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Updated to use Python 3 by Malcolm Greaves.
#
# Python script to find the largest files in a git repository.
# The general method is based on the script in this blog post:
# http://stubbisms.wordpress.com/2009/07/10/git-script-to-show-largest-pack-objects-and-trim-your-waist-line/
#
# The above script worked for me, but was very slow on my 11GB repository. This version has a bunch