Skip to content

Instantly share code, notes, and snippets.

@bendu
bendu / cfn-custom.txt
Created November 7, 2022 21:28
How I get around CDK limitations for stack policy, termination protection, and rollback alarms
There are two files here: a python file to call CFN APIs and a TypeScript file to define a construct
========================================
import { CustomResource, Duration } from 'aws-cdk-lib';
import { PolicyStatement } from 'aws-cdk-lib/aws-iam';
import { Code, Runtime, SingletonFunction } from 'aws-cdk-lib/aws-lambda';
import { Construct } from 'constructs';
@bendu
bendu / loadImage.ps1
Last active August 20, 2016 16:26
quick powershell script for generating various direction arrows. For https://github.com/OneBusAway/onebusaway-android/pull/647
$veh = @('subway', 'tram', 'boat', 'train')
function select-arrow
{
param ($v, $xml, $dir, $id)
$north = $xml.clone()
$north.svg.path | % {
if ($_.id -like 'path3021*' -and -not ($_.id -like $id))
{
$_.ParentNode.RemoveChild($_)