This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from collections import defaultdict | |
| import boto3 | |
| """ | |
| A tool for retrieving basic information from the running EC2 instances. | |
| """ | |
| # Connect to EC2 | |
| ec2 = boto3.resource('ec2') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Uncomment to print commands being executed | |
| # set -x | |
| pid=0 | |
| # SIGTERM-handler | |
| term_handler() { | |
| echo "Handler INT"; | |
| if [ $pid -ne 0 ]; then | |
| kill -SIGTERM "$pid" | |
| wait "$pid" |
Initialize a git repo in the current directory
# git init
Add a remote called "origin"
git remote add origin https://github.com/your-username-here/your-repo-here.git
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| I reviewed some common Ruby methods and grouped them by behavior. | |
| Hopefully this helps someone else too. | |
| [Please copy paste and fix typos, add/delete, improve from this Gist.](https://gist.github.com/dirkdirk/9209d7ea67ac57543975162713910224) | |
| - | |
| # Array |