Skip to content

Instantly share code, notes, and snippets.

View sjehutch's full-sized avatar

scott hutchinson sjehutch

View GitHub Profile
@sjehutch
sjehutch / instance-types.sh
Created June 16, 2018 01:25 — forked from trestletech/instance-types.sh
Get all EC2 Instance Types in All Availability Zones
#!/bin/bash
echo "Getting list of Availability Zones"
all_regions=$(aws ec2 describe-regions --output text --query 'Regions[*].[RegionName]' | sort)
all_az=()
while read -r region; do
az_per_region=$(aws ec2 describe-availability-zones --region $region --query 'AvailabilityZones[*].[ZoneName]' --output text | sort)
while read -r az; do
@sjehutch
sjehutch / all_aws_lambda_modules.txt
Created February 24, 2018 07:39 — forked from gene1wood/all_aws_lambda_modules_python.md
AWS Lambda function to list all available Python modules and post the list to Pastebin
# module list (generated by listmodules.py)
#
# timestamp='20160226T200954Z'
# sys.version='2.7.10 (default, Dec 8 2015, 18:25:23) \n[GCC 4.8.3 20140911 (Red Hat 4.8.3-9)]'
# sys.platform='linux2'
# platform='Linux-4.1.13-19.31.amzn1.x86_64-x86_64-with-glibc2.2.5'
#
BaseHTTPServer
Bastion
CDROM
@sjehutch
sjehutch / bot.js
Created February 19, 2017 02:02 — forked from FireZenk/bot.js
Twitter bot using node.js and twit module to retweet interesting info of node.js
//
// Bot
// class for performing various twitter actions
//
var Twit = require('../lib/twitter');
var Bot = module.exports = function(config) {
this.twit = new Twit(config);
};
@sjehutch
sjehutch / node-ec2-ubuntu-cluster
Created February 7, 2016 15:56 — forked from gflarity/node-ec2-ubuntu-cluster
Node+cluster on Amazon EC2 Quickstart
#First you'll need to Signup for AWS/EC2 and generate a key pair. Google it, there should be plenty of
#tutorials.
#Next, create an instance using the AWS Management Console and log into it using your key pair.
#You can find the AMI's here https://help.ubuntu.com/community/EC2StartersGuide
#I picked a 64bit 10.04 LTS AMI in US-East.
#Install node's perquisites (or those that aren't the default ubuntu LTS ami):
sudo apt-get update
sudo apt-get install build-essential libssl-dev
#!/bin/bash
pear upgrade pear
## Install Phing #######################################
pear channel-discover pear.phing.info
pear install --alldeps phing/phing
## Install PHPUnit #####################################
yum install php-xml
@sjehutch
sjehutch / 0_reuse_code.js
Last active August 29, 2015 14:22
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console