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
const taskWaitThreeHours = new sfn.Wait(this, "Wait 3 hours for tasks to have executed.", { | |
time: sfn.WaitTime.duration(cdk.Duration.hours(3)) | |
}); | |
const deprovisionLambda = new nodeLambda.NodejsFunction(this, "deprovisionFn", { | |
runtime: lambda.Runtime.NODEJS_14_X, | |
entry: "workflow/deprovision.ts", | |
handler: "main", | |
timeout: cdk.Duration.seconds(30), | |
logRetention: logs.RetentionDays.ONE_MONTH, |
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
await Promise.all([$`sleep 1; echo 1`, $`sleep 2; echo 2`, $`sleep 3; echo 3`]); |
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
// Get memory stats and see if any are overprovisioned | |
filter @type = "REPORT" | |
| stats max(@memorySize / 1000 / 1000) as provisonedMemoryMB, | |
min(@maxMemoryUsed / 1000 / 1000) as smallestMemoryRequestMB, | |
avg(@maxMemoryUsed / 1000 / 1000) as avgMemoryUsedMB, | |
max(@maxMemoryUsed / 1000 / 1000) as maxMemoryUsedMB, | |
provisonedMemoryMB - maxMemoryUsedMB as overProvisionedMB | |
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
pyenv local 3.9.4 | |
python -m pip install --user virtualenv | |
python -m virtualenv .env | |
source .env/bin/activate | |
python -m pip install pandas matplotlib | |
python -m pip freeze > requirements.txt |
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
prefix=$(brew --prefix) | |
export LDFLAGS="-L$prefix/opt/xz/lib $LDFLAGS" | |
export CPPFLAGS="-I$prefix/opt/xz/include $CPPFLAGS" | |
export PKG_CONFIG_PATH="$prefix/opt/xz/lib/pkgconfig:$PKG_CONFIG_PATH" | |
# YOU CANNOT HAVE THE GNUBINS in your PATH when you run this | |
PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install 3.9.4 | |
python3 -c "import lzma" # should work and not throw "cannot import _lzma" |
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
import "isomorphic-fetch"; | |
import { defineFeature, loadFeature } from "jest-cucumber"; | |
import * as uuid from "uuid"; | |
import * as http from "http"; | |
import ngrok from "ngrok"; | |
const feature = loadFeature("./acceptance/broadcast.feature"); | |
defineFeature(feature, (test) => { | |
let ngrokUrl: string; |
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
Feature: Broadcast that a item has been added so that downstream listeners can action. | |
Scenario: When a new item is added to the table it should be published to the mySNSTopicName topic. | |
Given I have a listener subscribed to the "mySNSTopicName" SNS topic | |
And I have an "MyDynamoTable" table | |
When an item is added | |
Then I will receive a message notifying me of it | |
And I will be able to read it from the table. | |
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
gitc () { | |
msg=${1:-'Quick commit'} | |
git add . && git commit -m "$msg" && git push origin $(git branch | sed -n "/\* /s///p") | |
} |
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
Type: AWS::Route53::HealthCheck | |
Properties: | |
HealthCheckConfig: | |
Port: 443 | |
Type: HTTPS | |
ResourcePath: /prod/system/health/check | |
FullyQualifiedDomainName: | |
Fn::Join: | |
- "" | |
- - Ref: sensiveRootSensiveRegionalApiF65332A1 |
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
Type: AWS::Route53::HealthCheck | |
Properties: | |
HealthCheckConfig: | |
port: 443 | |
type: HTTPS | |
resourcePath: /prod/system/health/check | |
fullyQualifiedDomainName: | |
Fn::Join: | |
- "" | |
- - Ref: sensiveRootSensiveRegionalApiF65332A1 |