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 ( | |
"github.com/aws/aws-sdk-go-v2/aws" | |
"github.com/aws/aws-sdk-go-v2/config" | |
"github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider" | |
"github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider/types" | |
) | |
// create the AWS client - uses environment/profile for values | |
cognitoidentityprovider.NewFromConfig(config.LoadDefaultConfig(context.Background())) |
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
# | |
# S3 bucket for a web files, with CloudFront and custom domain. | |
# | |
# The bucket is setup to be private, only accessible via CloudFront. | |
# This uses a CloudFront OAI to provide access to the bucket, and also restricts | |
# access to be SSL/HTTPS only. | |
# The SSL cert was created manually, as it has to be created in us-east-1 for | |
# use with CloudFront, and there is no way to specify a region in CloudFormation | |
# when creating a cert. | |
# Finally it does Route53 DNS setup for the subdomain pointed at/for use with |
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
Item | Weight | Cost | |
---|---|---|---|
Bontrager Line Elite 30 | 1890g | $1000 | |
CushCore Pro 29 | 530g | $150 | |
Bontrager XR4 2.4 tire | 800g | $70 | |
Bontrager XR3 2.4 tire | 755g | $70 | |
TOTAL | 3975g | $1290 - $0.32/gram | |
---- | ---- | ---- | |
Reserve 30 SL w/ I9 hubs | 1723g | $1900 ($1615) | |
Tubolight HD | 180g | $96 | |
Kenda Booster SCT 2.4 tire | 690g | $75 |
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
package main | |
import ( | |
"context" | |
"log" | |
"os" | |
"strings" | |
"github.com/aws/aws-lambda-go/events" | |
"github.com/aws/aws-lambda-go/lambda" |
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 | |
# | |
# Script to produce tiled raster import of a large data source, so that we can | |
# import in chunks, and be able to handle failures. This takes the lat/long | |
# mins and maxes for a rectangular area, and a VRT tile size and produces VRTs | |
# for each tile. It also outputs a shell script to import those VRTs along with | |
# outputting the last "rid" (raster ID in DB) after completing a tile, so that | |
# if it fails, we know the items to delete (so we can restart the failed tile, | |
# and not have duplicate records from what was partially imported). | |
# |
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
# | |
# Cognito user pool/auth setup | |
# | |
Resources: | |
MyAppUserPool: | |
Type: AWS::Cognito::UserPool | |
Properties: | |
UserPoolName: myapp_user_pool | |
UsernameAttributes: # use email as username/login | |
- 'email' |
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
functions: | |
myfunc: | |
handler: bin/myhandler | |
events: | |
- http: | |
path: myapipath | |
method: get | |
authorizer: | |
type: COGNITO_USER_POOLS | |
authorizerId: |
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
{ | |
"event": [ | |
{ | |
"time": "2020-06-16T15:22:33Z", | |
"lng": -122.03053391, | |
"lat": 37.33180957, | |
"uuid": "96a6f48c-fe67-4cad-be24-21d6523137f6", | |
"sensor_name": "CYT523", | |
"reading_value": 72.9, | |
"is_active": true |
NewerOlder