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 furlDomain = "lf4rhhulpamois3oz5z4i3anpe0loidx.lambda-url.us-east-2.on.aws"; | |
async function handleRequest(request) { | |
const url = new URL(request.url); | |
url.hostname = furlDomain; | |
const newRequest = new Request(url, request); | |
newRequest.headers.set('Host', furlDomain); | |
return await fetch(newRequest); |
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
Transform: AWS::Serverless-2016-10-31 | |
Resources: | |
Function: | |
Type: AWS::Serverless::Function | |
Properties: | |
Runtime: python3.9 | |
Handler: index.handler | |
InlineCode: | | |
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
Resources: | |
Bus: | |
Type: AWS::Events::EventBus | |
BusPolicy: | |
Type: AWS::Events::EventBusPolicy | |
Properties: | |
EventBusName: !Ref Bus | |
StatementId: AllowOrg | |
Statement: |
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
Transform: AWS::Serverless-2016-10-31 | |
Resources: | |
Function: | |
Type: AWS::Serverless::Function | |
Properties: | |
Runtime: python3.8 | |
Handler: index.handler | |
InlineCode: | | |
def handler(a, b): |
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
Parameters: | |
SecurityGroupIds: | |
Type: List<AWS::EC2::SecurityGroup::Id> | |
SubnetIds: | |
Type: List<AWS::EC2::Subnet::Id> | |
Resources: | |
Api: | |
Type: AWS::ApiGatewayV2::Api | |
Properties: |
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
generation process: | |
* go to https://crt.sh/?q=%25.amazonaws.com | |
* dump into a text document | |
* de-dupe regions by replacing us-east-1, ap-southeast-2, etc with "region" | |
* de-dupe ec2 by replacing ec2-123-45-67-89 with ec2-xx-xx-xx-xx | |
* also check out https://gist.github.com/phils/eefcc8b1dcbaf9e5cec4fb98b9413c7b for an even more digestible version | |
*.?.?.?.amazonaws.com |
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
set -euxo pipefail | |
service docker stop | |
vgextend docker /dev/nvme0n1 | |
lvremove -f /dev/docker/docker-pool | |
vgreduce docker /dev/sdcz1 | |
lvcreate -T docker -n docker-pool -L 200G | |
lvcreate docker -n scratch -L 200G | |
mkfs.ext4 -E nodiscard /dev/docker/scratch | |
mkdir /mnt/scratch |
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 python3 | |
import boto3 | |
import json | |
import sys | |
import os | |
import itertools | |
def chunks(l, n): | |
for i in range(0, len(l), n): | |
yield l[i:i + n] |
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
MacBookPro2017:linkerd aidan$ time ./sbt compile | |
Getting org.scala-sbt sbt 0.13.16 ... | |
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt/0.13.16/jars/sbt.jar ... | |
[SUCCESSFUL ] org.scala-sbt#sbt;0.13.16!sbt.jar (5481ms) | |
downloading https://jcenter.bintray.com/org/scala-lang/scala-library/2.10.6/scala-library-2.10.6.jar ... | |
[SUCCESSFUL ] org.scala-lang#scala-library;2.10.6!scala-library.jar (2939ms) | |
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/main/0.13.16/jars/main.jar ... | |
[SUCCESSFUL ] org.scala-sbt#main;0.13.16!main.jar (6141ms) | |
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/compiler-interface/0.13.16/jars/compiler-interface.jar ... | |
[SUCCESSFUL ] org.scala-sbt#compiler-interface;0.13.16!compiler-interface.jar (5975ms) |
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
--- | |
schemaVersion: '0.3' | |
description: Updates a Microsoft Windows AMI. By default it will install all Windows | |
updates, Amazon software, and Amazon drivers. It will then sysprep and create a | |
new AMI. Supports Windows Server 2008 R2 and greater. | |
assumeRole: "{{ AutomationAssumeRole }}" | |
parameters: | |
SourceAmiId: | |
type: String | |
description: "(Required) The source Amazon Machine Image ID." |
NewerOlder