Skip to content

Instantly share code, notes, and snippets.

@lancehunt
lancehunt / prune_aws_security_groups.md
Last active October 31, 2017 17:27 — forked from asinghal/prune_aws_security_groups.md
Clean up AWS Security groups

Commands to get security groups in use and echo names of groups that can not be found in use

Note: Always check manually before deleting security groups. There are various places the groups may be used, and the scripts output may not always be conclusive

aws elb describe-load-balancers --query 'LoadBalancerDescriptions[*].SecurityGroups' --output text | tr '\t' '\n' | sort | uniq > used.txt

aws elbv2 describe-load-balancers --query 'LoadBalancers[*].SecurityGroups' --output text | tr '\t' '\n' | sort | uniq >> used.txt
@lancehunt
lancehunt / HowToOTGFast.md
Created October 24, 2016 03:41 — forked from gbaman/HowToOTGFast.md
Simple guide for setting up OTG modes on the Raspberry Pi Zero, the fast way!

###Setting up Pi Zero OTG - The quick way (No USB keyboard, mouse, HDMI monitor needed)
More details - http://blog.gbaman.info/?p=791

For this method, alongside your Pi Zero, MicroUSB cable and MicroSD card, only an additional computer is required, which can be running Windows (with Bonjour, iTunes or Quicktime installed), Mac OS or Linux (with Avahi Daemon installed, for example Ubuntu has it built in).
1. Flash Raspbian Jessie full or Raspbian Jessie Lite onto the SD card.
2. Once Raspbian is flashed, open up the boot partition (in Windows Explorer, Finder etc) and add to the bottom of the config.txt file dtoverlay=dwc2 on a new line, then save the file.
3. Finally, open up the cmdline.txt. Be careful with this file, it is very picky with its formatting! Each parameter is seperated by a single

@lancehunt
lancehunt / flow.json
Created April 21, 2012 23:29 — forked from zubairov/flow.json
Show CPUs
{
"nodes": [
{
"title": "Code",
"icon": "images/icons/code_64.png",
"top": 126,
"left": 227,
"compID": "code",
"code": "console.log(JSON.stringify(require('os').cpus(), null, '\\t'));\nconsole.log(this.get('flowID'));",
"id": "step_106"
@lancehunt
lancehunt / flow.json
Created April 21, 2012 23:28 — forked from zubairov/flow.json
Twitter Timeline to Log
{
"nodes": [
{
"title": "Timeline",
"icon": "images/icons/twitter_64.png",
"top": 149,
"left": 182,
"compID": "twitter",
"username": "lancehunt",
"backFill": "15",