aws autoscaling describe-auto-scaling-instances \
| jq '.AutoScalingInstances[] | {AutoScalingGroupName, InstanceId}'
list instance IDs for a particular ASG
var url = require('url'); | |
var https = require('https'); | |
var querystring = require('querystring'); | |
var webhookID = 'YOUR/WEBHOOK/integration-id'; | |
var webhookURLBase = 'https://hooks.slack.com/services/'; | |
var webhookURL = [webhookURLBase, webhookID].join(''); | |
var slashCommandToken = 'your-slash-command-token'; |
var AWS = require('aws-sdk'); | |
var url = require('url'); | |
var https = require('https'); | |
var hookUrl, slackChannel; | |
hookUrl = 'https://hooks.slack.com/services/ABC/DEF/XYZ'; // Enter your Slack hook URL here | |
slackChannel = 'MySlackChannel'; // Enter the Slack channel to send a message to | |
var postMessage = function(message, callback) { | |
var body = JSON.stringify(message); |
#!/bin/bash | |
# Run as root or sudo the commands that need it as you go. | |
# brew version 0.9.5 | |
# Mac OS X 10.10.1 | |
# A little bit changed version of this: | |
# http://stackoverflow.com/questions/19538118/osx-mavericks-bind-no-longer-installed-how-to-get-local-dns-server-working |
## convert HTML POST data or HTTP GET query string to JSON - sourced from https://forums.aws.amazon.com/thread.jspa?messageID=673012 | |
## get the raw post data from the AWS built-in variable and give it a nicer name | |
#if ($context.httpMethod == "POST") | |
#set($rawAPIData = $input.path('$')) | |
#elseif ($context.httpMethod == "GET") | |
#set($rawAPIData = $input.params().querystring) | |
#set($rawAPIData = $rawAPIData.toString()) | |
#set($rawAPIDataLength = $rawAPIData.length() - 1) | |
#set($rawAPIData = $rawAPIData.substring(1, $rawAPIDataLength)) |
require 'rubygems' | |
require 'sinatra' | |
require 'rdiscount' | |
require 'haml' | |
require 'dm-core' | |
require 'sinatra-authentication' | |
use Rack::Session::Cookie, 'shhhhhhhhhhhhhhh~' | |
class Page |
#!flask/bin/python | |
from flask import Flask, jsonify, abort, request, make_response, url_for | |
from flask.ext.httpauth import HTTPBasicAuth | |
app = Flask(__name__, static_url_path = "") | |
auth = HTTPBasicAuth() | |
@auth.get_password | |
def get_password(username): | |
if username == 'miguel': |
import argparse | |
import time | |
from boto.s3.connection import S3Connection | |
from boto.exception import S3ResponseError | |
def run(args): | |
s3_connection = S3Connection(args.aws_access_key, args.aws_secret_access_key) | |
source_bucket = s3_connection.get_bucket(args.source_bucket) | |
destination_bucket = None |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# | |
# gitprompt.py | |
# | |
# Copyright 2012 Manuel Vázquez Acosta <mva DOT led AT google-mail-address-here.com> | |
# | |
# This program is free software; you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation; either version 2 of the License, or |
{ | |
"syncToken": "1447807337", | |
"createDate": "2015-11-18-01-22-03", | |
"prefixes": [ | |
{ | |
"ip_prefix": "23.20.0.0/14", | |
"region": "us-east-1", | |
"service": "AMAZON" | |
}, | |
{ |