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
### Keybase proof | |
I hereby claim: | |
* I am phwelo on github. | |
* I am danielagans (https://keybase.io/danielagans) on keybase. | |
* I have a public key ASDaF1ApciS6XJOX4e9-o8LXVl-YYW3-pOUWu4xSB1Ezqgo | |
To claim this, I am signing this object: |
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 boto3 | |
import json | |
client = boto3.client('ec2') | |
ec2_result = client.describe_instances() | |
results = [] | |
for result in ec2_result["Reservations"]: |
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 boto3 | |
client = boto3.client('iam') | |
# three different calls to get inline-policy on all IAM items: | |
# list_groups - get_group_policy | |
# list_roles - get_role_policy | |
# list_users - get_user_policy |
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 boto3 | |
client = boto3.client('ec2') | |
def set_imdsv2_required(instance_id): | |
client.modify_instance_metadata_options( | |
InstanceId=instance_id, | |
HttpTokens='required', |
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 | |
from colorama import init, Fore, Back, Style | |
import sys | |
import argparse | |
init(autoreset=True) | |
what_color = Fore.BLACK + Back.WHITE | |
parser = argparse.ArgumentParser(exit_on_error=False) |
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 argparse, atexit, os, subprocess, time | |
from datetime import datetime | |
tmpfile = "/tmp/heaterstate" | |
# it's going to be nicer to have this switch off when the script is killed | |
def exit_handler(): | |
set_switch(args.ip, "off") |
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 requests | |
from bs4 import BeautifulSoup | |
import json | |
import sys | |
import transposer | |
import argparse | |
# transpose(source_chord, direction, to_key) |
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 requests | |
import json | |
import random | |
import webbrowser | |
import sys | |
# This is a query for 1.17.1 modpacks | |
base_searchpage = "https://www.modpackindex.com/api/v1/minecraft/version/71/modpacks?limit=100&page=" |
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 ipaddress | |
CYAN = '\033[96m' | |
END = '\033[0m' | |
BOLD = '\033[1m' | |
if 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
[ | |
{"name": "eDP-1", "workspaces": [1, 5]}, | |
{"name": "DP-1", "workspaces": [3, 4]}, | |
{"name": "HDMI-A-1", "workspaces": [2, 6, 7]} | |
] |
NewerOlder