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
TLD | renewal price until April 8th | Renewal price starting April 8th | Price difference in USD | price difference in % | |
---|---|---|---|---|---|
com | $13.00 | $14.00 | $1.00 | 7.69% | |
net | $11.00 | $15.00 | $4.00 | 36.36% | |
org | $12.00 | $14.00 | $2.00 | 16.67% | |
furniture | $47.00 | $114.00 | $67.00 | 142.55% | |
creditcard | $141.00 | $179.00 | $38.00 | 26.95% | |
reviews | $22.00 | $57.00 | $35.00 | 159.09% | |
careers | $35.00 | $66.00 | $31.00 | 88.57% | |
fm | $92.00 | $121.00 | $29.00 | 31.52% |
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
{ | |
"AWSTemplateFormatVersion": "2010-09-09", | |
"Resources": { | |
"ExternalAssumeRole": { | |
"Type": "AWS::IAM::Role", | |
"Properties": { | |
"RoleName": "DoiT-Billing-Access", | |
"AssumeRolePolicyDocument": { | |
"Version": "2012-10-17", | |
"Statement": [ |
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/local/bin/python3 | |
import argparse | |
import botocore.exceptions | |
import socket | |
import random | |
import shlex | |
import boto3 | |
import json | |
import os |
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
# assume role to the new account | |
import boto3 | |
sts_client = boto3.client('sts') | |
assume_account_id = '0123456789012' | |
assume_role_name = 'role_name' | |
role_session_name = 'check_cost_explorer_script' | |
assumed_role_object = sts_client.assume_role( | |
RoleArn=f'arn:aws:iam::{assume_account_id}:role/{assume_role_name}', | |
RoleSessionName=role_session_name | |
) |
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/python36 | |
import boto3 | |
import requests | |
import os | |
def ec2_associate_eip(aws_instance, region_name, tag_name, tag_value): | |
client = boto3.client('ec2', region_name=region_name) | |
eip_list = client.describe_addresses(Filters=[{'Name': f'tag:{tag_name}', 'Values': [tag_value]}]) | |
free_eips = [] |
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 json | |
from datetime import datetime | |
import email | |
from email import policy | |
def print_with_timestamp(*args): | |
print(datetime.utcnow().isoformat(), *args) |
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
from datetime import datetime | |
import json | |
import pytz | |
def return_day(timestamp: str, local_timezone: str): | |
return datetime.fromtimestamp(int(timestamp/1000)).astimezone(pytz.timezone(local_timezone)).strftime( | |
'%m/%d/%Y') | |
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/local/bin/python3 | |
import argparse | |
import botocore.exceptions | |
import socket | |
import random | |
import shlex | |
import boto3 | |
import json | |
import os |
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 datetime | |
from PyPDF2 import PdfFileMerger | |
import os | |
def get_pdf_files_from_current_folder(current_folder: str): | |
output_list = [] | |
for item in os.listdir(current_folder): | |
if item.endswith('.pdf'): | |
output_list.append(item) |
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/local/bin/python3 | |
import configparser | |
import boto3 | |
import pyotp | |
import keyring | |
if __name__ == '__main__': | |
try: | |
# mfa-secret - the name of secret in MacOS keychain access | |
mfa_token_secret = keyring.get_password("mfa-secret", "mfa-secret") |
NewerOlder