Skip to content

Instantly share code, notes, and snippets.

View rpkim's full-sized avatar

Jay Kim rpkim

View GitHub Profile
from ctypes import *
from numpy import *
import platform
import inspect
import time
import os
from pprint import pprint
INTEROPLIB = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) + "/libinterop-api.so.1"
if platform.system() == 'Windows':
@rpkim
rpkim / aws.sg.unused
Created March 22, 2019 04:47 — forked from thibautsacreste/aws.sg.unused
Bash: list unused AWS security groups
#!/usr/bin/env bash
# lists all unused AWS security groups.
# a group is considered unused if it's not attached to any network interface.
# requires aws-cli and jq.
# all groups
aws ec2 describe-security-groups \
| jq --raw-output '.SecurityGroups[] | [.GroupName, .GroupId] | @tsv' \
| sort > /tmp/sg.all