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
provider "aws" { | |
region = "eu-west-1" | |
} | |
module "vpc" { | |
source = "terraform-aws-modules/vpc/aws" | |
version = "~> 5.1.2" | |
name = "sombra-vpc" | |
cidr = "10.0.0.0/16" |
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
provider "aws" { | |
region = "eu-west-1" | |
} | |
module "vpc" { | |
source = "terraform-aws-modules/vpc/aws" | |
version = "~> 5.1.2" | |
name = "sombra-vpc" | |
cidr = "10.0.0.0/16" |
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 got from 'got'; | |
import { mapSeries } from 'bluebird'; | |
/** | |
* Finds all players who had 100% completion percentages during a given week of a given year. | |
* | |
* @param year - The year the games were played | |
* @param week - The week of the regular season a game was played | |
* @returns a list of names | |
*/ |
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
#!/bin/bash | |
WORKSPACE="${WORKSPACE:-@main/main}" | |
echo "Finding dependencies to watch under $WORKSPACE..." | |
watchedDependencies=$(yarn info "$WORKSPACE" --all --recursive --dependents --json | jq ".children.Dependencies[].locator, .value" | grep '@workspace' | sed 's/.*@workspace://' | sed 's/"$//' | xargs echo) | |
echo "Dependencies being watched: $watchedDependencies" | |
echo "" | |
echo "Finding dependencies that changed..." |
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
// external | |
import * as aws from '@pulumi/aws'; | |
import * as pulumi from '@pulumi/pulumi'; | |
const awsAccountId = aws.getCallerIdentity().then(({ accountId }) => accountId); | |
const accountArn = pulumi.interpolate`arn:aws:iam::${awsAccountId}:root`; | |
const kmsPolicy = accountArn.apply( | |
(arn) => | |
({ | |
Version: '2012-10-17', |
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
// external | |
import noble from '@abandonware/noble'; | |
noble.on('stateChange', async (state) => { | |
if (state === 'poweredOn') { | |
await noble.startScanningAsync(); | |
} | |
}); | |
noble.on('scanStart', () => { |
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
print("Buy Bitcoin") |
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
/** | |
* Wrapper around terragrunt to display output succinctly on Atlantis. | |
* | |
* Terragrunt is notoriously verbose, which can cause Atlantis to output | |
* hundreds of comments on single PRs, which can be annoying. | |
* | |
* This script will output just the final plan for resources to update on | |
* successful terragrunt runs, but will output all terragrunt output on | |
* errors. | |
*/ |
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
""" | |
Prereq: pip install --user pandas xlrd | |
Usage: | |
1) Create accounts.xlsx file | |
2) Run 'python accounts.py' | |
""" | |
import pandas as pd | |
import json |
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 { mount } from "@vue/test-utils"; | |
const parentComponent = { | |
provide() { | |
return { | |
val: 'from parent' | |
}; | |
}, | |
template: ` | |
<div> |
NewerOlder