Skip to content

Instantly share code, notes, and snippets.

View roboticpuppies's full-sized avatar

Mochammad Syaifuddin roboticpuppies

View GitHub Profile
@roboticpuppies
roboticpuppies / aliasgen.py
Last active May 21, 2025 16:58
aws alias generator
import boto3
import re
# Clean instance name by removing non-alphanumeric characters
# So if you have an instance named "AWS-Instance-(2)", it will be written as "AWSInstance2"
def clean_name(name):
return re.sub(r'[^a-zA-Z0-9]', '', name)
# Get the instance list
def get_ec2_instances(region):
@roboticpuppies
roboticpuppies / gist:df257df1b849e1d13a54e56198e950d4
Created February 16, 2022 07:59
VSCode select every N lines
1. Ctrl+F
2. Toggle regex to on (ALT+R)
3. Search (.*\n){N}. Replace N with the number of lines to select. For example enter 2 to select every 2 lines.
4. Select All Occurrences of find Match (ALT+Enter)