I hereby claim:
- I am y13i on github.
- I am y13i (https://keybase.io/y13i) on keybase.
- I have a public key whose fingerprint is 0553 2BCB D638 F001 178D 1EFC 4913 E132 5A60 DE8E
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
Deploys AutoMuteUs to ECS/Fargate/EFS/Route53 as cheap as possible.
$ aws ssm put-parameter \
#SingleInstance force | |
#NoEnv | |
#Warn | |
SendMode Input | |
SetWorkingDir %A_ScriptDir% | |
sc03A & a::Send {Home} | |
sc03A & b::Send {Left} | |
sc03A & c::Send ^{c} |
{ | |
"Parameters": { | |
"InstanceType": { | |
"Type": "String", | |
"Default": "t3a.micro" | |
}, | |
"ImageId": { | |
"Type": "AWS::SSM::Parameter::Value<AWS::EC2::Image::Id>", | |
"Default": "/aws/service/ecs/optimized-ami/amazon-linux-2/recommended/image_id" | |
}, |
{ | |
"Parameters": { | |
"VpcCidr": { | |
"Description": "VPC network range. https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Subnets.html#VPC_Sizing", | |
"Type": "String", | |
"Default": "10.0.0.0/16", | |
"AllowedPattern": "^(10\\.([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])|172\\.(1[6-9]|2[0-9]|3[01])|192\\.168)\\.0\\.0/(1[6-9]|2[0-8])$" | |
}, | |
"SubnetCidrBits": { | |
"Type": "Number", |
// todo: use https://github.com/transitive-bullshit/random | |
function rnorm() { | |
return ( | |
Math.sqrt(-2 * Math.log(1 - Math.random())) * | |
Math.cos(2 * Math.PI * Math.random()) | |
); | |
} | |
function textpand(text, length = text.length, sd = 0) { |
await listObjectsAsObservable(s3, { | |
Bucket: bucket, | |
Prefix: prefix, | |
MaxKeys: 50 | |
}) | |
.pipe( | |
tap(listObjectsResult => { | |
console.log( | |
`!!! list contains ${listObjectsResult.Contents!.length} items.` | |
); |
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); | |
} |
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 \ |
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 |