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
| import cdk = require('@aws-cdk/cdk'); | |
| import ec2 = require('@aws-cdk/aws-ec2'); | |
| import elastic = require('@aws-cdk/aws-elasticache'); | |
| import rds = require ('@aws-cdk/aws-rds'); | |
| import es = require("@aws-cdk/aws-elasticsearch"); | |
| import ecs = require('@aws-cdk/aws-ecs'); | |
| import s3 = require("@aws-cdk/aws-s3"); | |
| import elbv2 = require('@aws-cdk/aws-elasticloadbalancingv2'); | |
| import route53 = require('@aws-cdk/aws-route53'); | |
| import certificateManager = require("@aws-cdk/aws-certificatemanager"); |
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
| { | |
| "files.exclude": { | |
| // Hide the node_modules folder | |
| "node_modules/": true, | |
| // Hide all files that end in .d.ts | |
| "**/*.d.ts": true, | |
| // Hide all files that end with .js if they have a .ts file | |
| "**/*.js": { | |
| "when": "$(basename).ts" | |
| }, |
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
| import * as ec2 from '@aws-cdk/aws-ec2'; | |
| import {DockerImageAsset} from '@aws-cdk/aws-ecr-assets'; | |
| import * as ecs from "@aws-cdk/aws-ecs"; | |
| import {FargatePlatformVersion} from "@aws-cdk/aws-ecs"; | |
| import * as ecs_patterns from '@aws-cdk/aws-ecs-patterns'; | |
| import * as efs from "@aws-cdk/aws-efs"; | |
| import {AccessPoint} from "@aws-cdk/aws-efs"; | |
| import {RetentionDays} from "@aws-cdk/aws-logs"; | |
| import * as route53 from '@aws-cdk/aws-route53'; | |
| import * as cdk from "@aws-cdk/core"; |
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
| function ConvertKeysToLowerCase(obj) { | |
| if (!obj || typeof obj !== "object") { | |
| return obj; | |
| } | |
| var output = {}; | |
| for (let i in obj) { | |
| if (Object.prototype.toString.apply(obj[i]) === '[object Object]') { | |
| output[i.toLowerCase()] = ConvertKeysToLowerCase(obj[i]); | |
| }else if(Object.prototype.toString.apply(obj[i]) === '[object Array]'){ | |
| output[i.toLowerCase()]=[]; |
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
| sls package --stage alpha -p output //--stage alpha | |
| # Update $LATEST version of function | |
| aws lambda update-function-code --function-name apollo-lambda-alpha-graphql --zip-file fileb://output/apollo-lambda.zip --output json | |
| # Publish new version of function | |
| VERSION=$(aws lambda publish-version --function-name apollo-lambda-alpha-graphql --output json | jq -r .Version) | |
| # Verify that the new version is healthy | |
| … |
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
| // Generic constructor signature | |
| type ClassConstructor<T> = new (...args: any[]) => T; | |
| // The contraint we might want to apply to our constructor signature | |
| export interface IHelperRepository { | |
| getEntity<T extends EntityDTO>(entityQuery: EntityQuery): Promise<Maybe<T>>; | |
| getItems<T extends SummaryDTO>(itemsQuery: ItemsQuery): Promise<T[]>; | |
| } | |
| type HelperRepoConstructor = ClassConstructor<IHelperRepository>; |
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
| type ClassConstructor<T> = new (...args: any[]) => T; | |
| function withEZDebug<C extends ClassConstructor<{ getDebugValue(): object }>>( | |
| Class: C | |
| ) { | |
| return class extends Class { | |
| debug() { | |
| let Name = Class.name; | |
| let value = this.getDebugValue(); | |
| return Name + '(' + JSON.stringify(value) + ')'; |
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
| docker --tlsverify --tlskey keys/docker/docker_key.pem --tlscert keys/docker/docker_cert.pem --tlscacert keys/ca/ca_cert.pem images |
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
| curl --cacert keys/ca/ca_cert.pem --cert keys/nginx/nginx_cert.pem --key keys/nginx/nginx_key.pem | |
| --resolve 'nginx.ecomm.com:8443:10.0.0.128' https://nginx.ecomm.com:8443/v1.39/images/json |
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
| git config --global alias.lg "log --all --graph --pretty='%C(green)%h%Creset %C(cyan)%d%Creset %s'" | |