cat <<EOF > /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
baseurl=http://yum.kubernetes.io/repos/kubernetes-el7-x86_64
This file contains 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
acm.amazonaws.com | |
alexa-appkit.amazon.com | |
apigateway.amazonaws.com | |
application-autoscaling.amazonaws.com | |
appstream.application-autoscaling.amazonaws.com | |
appsync.amazonaws.com | |
athena.amazonaws.com | |
autoscaling.amazonaws.com | |
batch.amazonaws.com | |
channels.lex.amazonaws.com |
This file contains 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
# adding and committing | |
git add -A # stages All | |
git add . # stages new and modified, without deleted | |
git add -u # stages modified and deleted, without new | |
git commit --amend # Add staged changes to previous commit. Do not use if commit has been pushed. | |
git commit --amend --no-edit # Do so without having to edit the commit message. | |
# remotes - pushing, pulling, and tracking | |
git fetch # gets remote objects and refs. Needed if new branches were added on the remote. | |
git remote -v # Lists all remotes (verbose) |
This file contains 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
# Count total EBS based storage in AWS | |
aws ec2 describe-volumes | jq "[.Volumes[].Size] | add" | |
# Count total EBS storage with a tag filter | |
aws ec2 describe-volumes --filters "Name=tag:Name,Values=CloudEndure Volume qjenc" | jq "[.Volumes[].Size] | add" | |
# Describe instances concisely | |
aws ec2 describe-instances | jq '[.Reservations | .[] | .Instances | .[] | {InstanceId: .InstanceId, State: .State, SubnetId: .SubnetId, VpcId: .VpcId, Name: (.Tags[]|select(.Key=="Name")|.Value)}]' | |
# Wait until $instance_id is running and then immediately stop it again | |
aws ec2 wait instance-running --instance-id $instance_id && aws ec2 stop-instances --instance-id $instance_id | |
# Get 10th instance in the account |
This file contains 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
AWSTemplateFormatVersion: "2010-09-09" | |
Description: > | |
Create an S3 bucket and configure it for s3-website hosting | |
Create a record in a pre-existing Route53 HostedZone and point at the newly created bucket | |
Parameters: | |
HostedZoneID: | |
Description: The Hosted Zone ID in which to create the website DNS record | |
Type: AWS::Route53::HostedZone::Id | |
WebsiteAddress: | |
Description: > |
This file contains 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
AWSTemplateFormatVersion: "2010-09-09" | |
Description: > | |
Launch a static website backed by an S3 bucket and served via https through cloudfront. | |
Assumes you have the following available already | |
* An address in mind (e.g. blog.example.com) | |
* An existing Route53 Hosted Zone for the domain | |
* A validated AWS ACM certificate arn for the desired web address which must be in eu-west-1 | |
Parameters: | |
HostedZoneID: | |
Description: > |
This file contains 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
/* Polyfill indexOf. */ | |
var indexOf; | |
if (typeof Array.prototype.indexOf === 'function') { | |
indexOf = function (haystack, needle) { | |
return haystack.indexOf(needle); | |
}; | |
} else { | |
indexOf = function (haystack, needle) { | |
var i = 0, length = haystack.length, idx = -1, found = false; |