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 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 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 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 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 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 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
aim | |
band | |
bbmenterprise | |
bitmessage | |
cryptocat | |
discord | |
facebookmessanger | |
facetime | |
firechat | |
gadugadu |
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 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 |
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 python3 | |
""" | |
The missing function for AWS region support | |
""" | |
from collections import defaultdict | |
import requests | |
import pandas as pd | |
list_of_regions = [] | |
list_of_services = [] |
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 | |
import os | |
import re | |
import sys | |
DEVICE_LIST_RE = r"(\d{1,3}):\s(allow|block)\sid\s([0-9abcdef]{4}:[0-9abcdef]{4})\sserial\s\"(.*)\"\sname\s\"(.*)\"\shash\s\"([a-zA-Z0-9=+\/]{44})\"\sparent-hash\s\"([a-zA-Z0-9=+\/]{44})\"\svia-port\s\"(.{1,8})\"\swith-interface\s([^\"]*)\s\"(.*)\"" | |
stream = os.popen('usbguard list-devices') | |
list = stream.read().strip().splitlines() |
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 lambdalayer.mymodule | |
def lambda_handler(event, context) | |
mymodule.offloadedcode(event, context) |
NewerOlder