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
version: 0.2 | |
phases: | |
install: | |
commands: | |
- npm install | |
build: | |
commands: | |
- npm test | |
post_build: |
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
provider "aws" { | |
region = "${var.region}" | |
} | |
module "vpc" { | |
source = "terraform-aws-modules/vpc/aws" | |
name = "EastWSingleNAT" | |
cidr = "10.0.0.0/16" |
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
const rg = require('./recursiveGetParametersByPath.js'); | |
rg.recursiveGet('/', 'us-east-1') | |
.then(parameters => { | |
console.log(JSON.stringify(parameters)); | |
}) | |
.catch(err => { | |
console.error(err, err.stack); | |
}); |
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
version: 0.2 | |
env: | |
parameter-store: | |
DIST_ID : "/cloudfront/offcoding/distid" | |
phases: | |
install: | |
commands: | |
- gem install bundler |
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
"Resources": { | |
"LaunchConfig": { | |
"Type": "AWS::AutoScaling::LaunchConfiguration", | |
"Properties": { | |
"InstanceMonitoring": false, | |
"InstanceType": { | |
"Fn::FindInMap": ["EnvMap", { | |
"Ref": "EnvType" | |
}, "InstanceType"] | |
}, |
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
"UserData": { | |
"Fn::Base64": { | |
"Fn::Join": [ | |
"", [ | |
"#!/bin/bash -ex\n", | |
"yum update -y\n", | |
"yum -y install ruby\n", | |
"yum -y install wget\n", | |
"yum -y install libcurl-devel\n", | |
"yum -y install zlib-devel\n", |
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
const bluebird = require('bluebird'); | |
const redis = require('redis'); | |
bluebird.promisifyAll(redis.RedisClient.prototype); | |
bluebird.promisifyAll(redis.Multi.prototype); | |
const redisClient = redis.createClient({ | |
host: process.env.CACHE_HOST | |
}); | |
let cacheFail = false; |
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
const mylib = require(`${process.cwd()}/lib/mylib`); |
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
const mylib = require('../../lib/mylib'); // Wait...is it two or three directories up? |
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
var policy = Policy | |
.Handle<Exception>() | |
.WaitAndRetry(5, retryAttempt => TimeSpan.FromSeconds(Math.Pow(2, retryAttempt)), | |
(exception, timeSpan, retryCount, context) => | |
{ | |
Console.WriteLine($"{exception} == {timeSpan} == {retryCount} == {context}"); | |
}) | |
.ExecuteAndCapture(() => | |
{ | |
throw new InvalidOperationException("This is the exception message"); |
NewerOlder