Skip to content

Instantly share code, notes, and snippets.

@astrikos
astrikos / stale_security_groups.py
Created November 9, 2017 15:52
Script to detect stale AWS security groups
#!/usr/bin/env python
import boto3
import argparse
class StaleSGDetector(object):
"""
Class to hold the logic for detecting AWS security groups that are stale.
"""
def __init__(self, **kwargs):
@jimbocoder
jimbocoder / ad-hoc-ngrok-schlock
Last active July 13, 2017 03:16
ad hoc ngrok schlock
#!/bin/bash
if [[ ! -x /usr/local/bin/ngrok ]]; then
TMPFILE=`tempfile`
curl -s 'https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip' -o "$TMPFILE.zip"
sudo unzip -f "$TMPFILE.zip" ngrok -d /usr/local/bin/
rm -f "$TMPFILE.zip"
fi