- Docker Machine + Docker
- curl
- A Virtualbox-driven Docker Machine called "default".
The git.io URL (https://git.io/v2MHR) is a shortened form of the raw url of the plist.
import boto3 | |
import json | |
import logging | |
import time | |
logger = logging.getLogger() | |
logger.setLevel(logging.INFO) | |
def notify_on_error(message): |
"MyLambdaLifecycleFunction": { | |
"Type": "AWS::Lambda::Function", | |
"Properties": { | |
"Handler": "asg-graceful-lifecycle-termination.lambda_handler", | |
"Role": { "Fn::GetAtt" : ["LambdaExecutionRole", "Arn"] }, | |
"Code": { | |
"S3Bucket": "lambda-functions", | |
"S3Key": "asg-graceful-lifecycle-termination.zip" | |
}, | |
"Runtime": "python2.7", |
"myLifecycleHookTopic" : { | |
"Type" : "AWS::SNS::Topic", | |
"Properties" : { | |
"Subscription" : [ | |
{ "Endpoint" : { "Fn::GetAtt" : [ "MyLambdaLifecycleFunction", "Arn" ] }, "Protocol" : "lambda" } | |
] | |
} | |
} | |
"myLifecycleHook": { |
"myLifecycleHook": { | |
"Type": "AWS::AutoScaling::LifecycleHook", | |
"Properties": { | |
"AutoScalingGroupName": { "Ref": "myAutoScalingGroup" }, | |
"HeartbeatTimeout": 300, | |
"LifecycleTransition": "autoscaling:EC2_INSTANCE_TERMINATING", | |
"NotificationMetadata": { "Ref": "StackName" }, | |
"NotificationTargetARN": { "Ref": "lifecycleHookTopic" }, | |
"RoleARN": { "Fn::GetAtt": [ "lifecycleHookRole", "Arn" ] } | |
} |
#!/bin/bash | |
# Delete all containers | |
docker rm $(docker ps -a -q) | |
# Delete all images | |
docker rmi $(docker images -q) |
The git.io URL (https://git.io/v2MHR) is a shortened form of the raw url of the plist.
#!/usr/bin/env bash | |
# Return only response headers from Curl. | |
# | |
# Usage: curlHeaders http://www.someaddress.com | |
curl -k -s -D - $1 -o /dev/null |
#!/usr/bin/env bash | |
# This script installs brew and chowns the right directories needed to run | |
# brew as a standard user. Your user should be the owner of /usr/local which | |
# gets set during the installation of brew. The global homebrew cache directory | |
# group should be set to 'staff' which is not set during a brew install. This | |
# script fixes that. | |
# To begin, you MUST execute this script with your user account while it has | |
# admin privileges. Once the script completes, you can change your |
#!/bin/sh | |
# Fix NTP/Time | |
# https://github.com/boot2docker/boot2docker/issues/290 | |
boot2docker ssh -- sudo killall -9 ntpd | |
boot2docker ssh -- sudo ntpclient -s -h pool.ntp.org | |
boot2docker ssh -- sudo ntpd -p pool.ntp.org |
-----BEGIN PGP PUBLIC KEY BLOCK----- | |
Version: Mailvelope v2.2.2 | |
Comment: https://www.mailvelope.com | |
xsFNBFsO5ogBEAC5zWoeOdrDO3SYVG+3/1vsiPQG7IZP3WZghjLhCVd1tZXS | |
ZeZihtAhRKolaTFYLyZ1YspgANylnNU3G5BdbfqLXyEcApY9bpQbmu6VbslW | |
H6289/N22VposWApzQ/g6vmwFv2ey/U4uJZ5M9xHGEmjOk0ZKDA5nBG6sP02 | |
KqbMauqYQowUZ6fHiDAYIwOqVBBXczXqmwin1o3Om76mrEJuQAdmEaFkVZ+a | |
bSlhMF6rhwOwMWPjA0YfpUUidbMGlgf/SmIAj/EU+NLwFCi4B2Mv6ybuXsc8 | |
h+rLSrC+rx2XSLS4P6bZeZYUzPSGDa7qp42IrMZgLphpQclionAfooNuTpux |