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 { config, STS } = require("aws-sdk"); | |
| const { execSync } = require("child_process"); | |
| const sts = new STS(); | |
| if (!config.region) { | |
| console.log("Set `$AWS_REGION` environment variable."); | |
| process.exit(1); | |
| } |
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
| FROM ruby:2.5-alpine | |
| RUN mkdir /app | |
| WORKDIR /app | |
| RUN \ | |
| set -x \ | |
| && apk upgrade --no-cache \ | |
| && apk add --no-cache --virtual \ | |
| build-dependencies \ | |
| && apk add --no-cache \ |
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
| export AWS_ACCOUNT_ID=nnnn | |
| export AWS_REGION=xxxx | |
| export CONTAINER_REPOSITORY=xxxx | |
| export CONTAINER_IMAGE_TAG=0.0.x | |
| # Docker login to ECR | |
| $(aws ecr get-login --no-include-email) # bash, zsh | |
| # eval (aws ecr get-login --no-include-email) # fish | |
| # build, tag, and push docker image |
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
| Description: Generic AWS VPC Networking | |
| Parameters: | |
| PrivateToInternetAccess: | |
| Type: String | |
| Description: If true, NAT Gateways and Elastic IPs will be created for the internet access from private subnets. | |
| AllowedValues: | |
| - "false" | |
| - "true" | |
| Default: "false" | |
| CidrPrefix: |
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
| // workaround: when webpack resolve.alias not working | |
| import * as VueAll from "vue"; | |
| import VueDefault from "vue"; | |
| export type Vue = VueDefault; | |
| export const Vue = <typeof VueDefault><any>VueAll; | |
| import * as VueRouterAll from "vue-router"; | |
| import VueRouterDefault from "vue-router"; | |
| export type Router = VueRouterDefault; |
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
| new Array(20).fill(undefined).map(() => {const chars = 'qwertyuiopasdfghjklzxcvbnm1234567890!@#$%^&*()-_=+[{]};:/?'.split(''); return chars[Math.floor(Math.random() * chars.length)]}).join(''); |
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
| // ... | |
| "apps": [ | |
| { | |
| "platform": "browser", | |
| "root": "src", | |
| "outDir": "dist/browser", | |
| // ... | |
| { | |
| "platform": "server", | |
| "root": "src", |
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
| String(42, radix: 16) // => "2a" |
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
| 4 |-------|-------|-------|------- | |
| 8 |---|---|---|---|---|---|---|--- | |
| 16 |-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|- | |
| 32 |||||||||||||||||||||||||||||||| | |
| *** * *** * *** * *** * *** * ** | |
| * * *** * *** * *** * *** * *** | |
| * *** * *** * *** * *** * *** * |
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
| $ awsprice listOfferRegions -o AmazonEFS | |
| []awsprice.RegionCode{ | |
| "ap-southeast-2", | |
| "eu-west-1", | |
| "us-east-1", | |
| "us-east-2", | |
| "us-west-2", | |
| } |