Skip to content

Instantly share code, notes, and snippets.

View AstroTom's full-sized avatar

Tom Rosenfeld AstroTom

View GitHub Profile
@polius
polius / rds-scan.py
Last active May 7, 2024 16:57
Retrieve the AWS RDS pricing for an Aurora cluster comparing Aurora Standard and Aurora I/O-Optimized modes.
# Install dependencies: python3 -m pip install boto3 rich
import json
import boto3
import argparse
from decimal import Decimal
from datetime import datetime, timedelta, timezone
from rich.console import Console
from rich.table import Table
from rich.tree import Tree
@mikesparr
mikesparr / mike-zshrc.sh
Last active October 15, 2023 06:29
Example helpers in zshrc file for Mac computer
# .zshrc
# other stuff already in file
# ------------------------------ my helpers ------------------------------------
# DoiT Shortcuts Help
function shortcuts {
echo "ENV vars:"
echo " - ORGANIZATION ($ORGANIZATION)"
@crazygit
crazygit / get_autosaling_name.sh
Created April 14, 2017 06:54
get aws ec2 autoscaling group name
# get current ec2 AutoScaling group name
# note: change region option as yours
aws autoscaling describe-auto-scaling-instances --region us-east-1 --output text --query=AutoScalingInstances[].AutoScalingGroupName --instance-ids=$(curl -s http://169.254.169.254/latest/meta-data/instance-id)
aws ec2 get-console-screenshot --instance-id ID --query "ImageData" --output text > f; cat f | base64 -D > screen.jpg