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
export default class CompoundMap<K, V> implements Map<K, V> { | |
private readonly items: Map<string, { key: K; value: V }>; | |
constructor(entries: [K, V][] = []) { | |
this.items = new Map( | |
entries.map(([key, value]) => [this.toKey(key), { key, value }]) | |
); | |
} | |
clear(): void { |
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
#!/usr/bin/env bash | |
readonly DEFAULT_VERSION='0.13.0' | |
readonly DEFAULT_API_HOST='app.terraform.io' | |
highlight() { echo -e "\033[36m$*\033[0m"; } | |
info() { echo -e "\033[36mINFO: $*\033[0m"; } | |
success() { echo -e "\033[32m$*\033[0m"; } | |
fail() { echo -e "\033[31mERROR: $*\033[0m" >&2; exit 1; } |
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
{ | |
"root": { | |
"access_key_id": "acceaccess_key_idss", | |
"secret_access_key": "secret_access_key" | |
}, | |
"roles": { | |
"SomeRole": { | |
"arn": "arn:aws:iam::ACCOUNT_ID:role/SomeRole", | |
"external_id": "external_id" | |
}, |
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
version: "3.7" | |
services: | |
elasticsearch: | |
image: docker.elastic.co/elasticsearch/elasticsearch:7.10.1 | |
ports: | |
- 9200 | |
- 9300 | |
environment: | |
- discovery.type=single-node |
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
'use strict'; | |
['START_URL', 'PATH_REGEX'].forEach((env) => { | |
if (!(env in process.env)) { | |
console.error(`The '${env}' environment variable is missing.`); | |
process.exit(1); | |
} | |
}); | |
let SimpleCrawler = require('simplecrawler'); |
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
[alias] | |
dmerged = "!git branch --merged | grep -v '\\*\\|master' | xargs -n 1 git branch -d" |
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
#!/usr/bin/env bash | |
## | |
# This configures an S3 bucket ObjectCreated notification for the given Lambda | |
# function so that when a file is uploaded the Lambda function is invoked. This | |
# is useful when the bucket is not defined in the same CloudFormation template | |
# as the function. CloudFormation cannot setup the notification in this case. | |
# | |
# Note that the AWS CLI is used and will require valid AWS credentials for the | |
# account containing the resources. The 'jq' JSON processor is also required |