This file contains hidden or 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 bash | |
| set -euo pipefail | |
| # Workaround for landing-zone-accelerator-on-aws issue #1088: | |
| # https://github.com/awslabs/landing-zone-accelerator-on-aws/issues/1088 | |
| # | |
| # The Custom::IdentityCenterAssignments custom resources do not handle errors, | |
| # so a failed assignment leaves the IdentityCenterStack stuck and it needs a | |
| # manual redeployment. This script: | |
| # 1. Finds the AWSAccelerator-IdentityCenterStack-* stack. |
This file contains hidden or 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 python3 | |
| """ | |
| Download all AWS invoices as PDFs for a given account over a date range. | |
| Uses the AWS Invoicing API: | |
| - invoicing:ListInvoiceSummaries -> enumerate invoices | |
| - invoicing:GetInvoicePDF -> get a pre-signed S3 URL for each PDF | |
| Note on retention: | |
| AWS typically retains ~7 years of invoices. Anything older than that is |
This file contains hidden or 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
| CloudFrontLogDestination: | |
| Type: AWS::Logs::DeliveryDestination | |
| Properties: | |
| Name: !Sub "CloudFrontS3Destination-${MyCloudFrontDistribution}" | |
| DestinationResourceArn: !Sub "arn:${AWS::Partition}:s3:::<insert your bucket name or ref here>" | |
| OutputFormat: "plain" # has to be plain as json can't be handled by DD due to the brackets in the field naming | |
| CloudFrontLogSource: | |
| Type: AWS::Logs::DeliverySource | |
| Properties: |
This file contains hidden or 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 os | |
| import sys | |
| # Initialize boto3 clients | |
| ec2_client = boto3.client('ec2') | |
| # Required VPC endpoint services | |
| ENDPOINT_SERVICES = { | |
| "com.amazonaws.{region}.ssm": "Interface", |
This file contains hidden or 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 python3 | |
| import sys | |
| import yaml | |
| import os | |
| def include_yaml(loader, node): | |
| # Get the path of the file to include | |
| file_path = os.path.join(os.path.dirname(loader.name), node.value) |
This file contains hidden or 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
| #!/bin/bash | |
| # Ensure Steampipe is installed | |
| if ! command -v steampipe >/dev/null; then | |
| sudo /bin/sh -c "$(curl -fsSL https://steampipe.io/install/steampipe.sh)" | |
| steampipe plugin install steampipe | |
| steampipe plugin install aws | |
| steampipe plugin update --all | |
| fi |
This file contains hidden or 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 python3 | |
| """ | |
| Fetch weather data from timeanddate | |
| """ | |
| import re | |
| import json | |
| from datetime import date | |
| import html | |
| import pprint | |
| import requests |
This file contains hidden or 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 python3 | |
| """ | |
| Type the content of the file given in parameter | |
| """ | |
| import time | |
| import sys | |
| import pyautogui | |
| # validate that we have something to type | |
| if not len(sys.argv) == 2: |
This file contains hidden or 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
| name,url | |
| 2go,https://www.2go.im | |
| 3cx,https://www.3cx.com | |
| activitypub,https://www.w3.org/TR/activitypub/ | |
| adamantmessenger,https://adamant.im | |
| airchat,https://airchat.com | |
| aprs,https://www.aprs.org | |
| atak,https://tak.gov | |
| ayoba,https://www.ayoba.me | |
| bale,https://bale.ai |
This file contains hidden or 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 board | |
| import digitalio | |
| import time | |
| led = digitalio.DigitalInOut(board.GP25) | |
| led.direction = digitalio.Direction.OUTPUT | |
| def blink(count=1, delay=0.5): | |
| for cv in range(count): | |
| led.value = True |
NewerOlder