View coros_get_activity_list.py
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
''' | |
Python PoC to interact with COROS Training Hub. | |
URL : https://training.coros.com/ | |
This script retrieves COROS's activity list for 2022/12. | |
$ python3 coros_activity_list.py | |
date,name,sportType,totalTime,distance,calorie,trainingLoad | |
20221230,Foo Run,100,9538,14651.11,1266085,117 |
View 00.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
Canyonバイクで、注文可能なモデルをすぐに注文したい | |
https://www.canyon.com/en-de/orderable-bikes/?prefn1=masterAvailabilityFlag&prefn2=pc_geschlecht&prefn3=pc_rahmengroesse&prefn4=pc_welt&prefv1=1&prefv2=Unisex&prefv3=XS&prefv4=Road |
View set-retention-for-lambda-at-edge-logs.sh
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 | |
# L@E logs are displayed or stored in the Region closest to the location where the function executed. | |
# This Bash script sets retention periods for CloudWatch Log in all regions. | |
FUNCTION_NAME=LambdaAtEdgeFunctionName | |
LOG_GROUP=/aws/lambda/us-east-1.${FUNCTION_NAME} | |
# Possible Values: 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, 731, 1827, and 3653. | |
RETENTION_IN_DAYS=30 |
View boto3_cloudfront_create_invalidation.py
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
''' | |
Invalidate Amazon CloudFront paths | |
API | |
- https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_CreateInvalidation.html | |
- https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/cloudfront.html#CloudFront.Client.create_invalidation | |
''' | |
import random | |
import time | |
import boto3 |
View cloudformation-template-for-aws-backup-thin-backups.yaml
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
AWSTemplateFormatVersion: "2010-09-09" | |
Description: "Backup Plan template for thin backups" | |
Resources: | |
BackupVaultWithThinBackups: | |
Type: "AWS::Backup::BackupVault" | |
Properties: | |
BackupVaultName: "BackupVaultWithThinBackups" | |
BackupPlanWithThinBackups: | |
Type: "AWS::Backup::BackupPlan" |
View eic-cli.sh
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 | |
# simple shell script to demonstrate how EC2 Instance Connect CLI is implemented. | |
# https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AccessingInstances.html | |
# | |
# Usage | |
# $ bash eic-cli.sh i-1234 | |
if [ $# -ne 1 ]; then | |
echo "Usage" | |
echo "$ bash eic-cli.sh i-1234" |
View iam-policy.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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"rds-db:connect" | |
], | |
"Resource": [ | |
"arn:aws:rds-db:region:account-id:dbuser:dbi-resource-id/database-user-name" |
View athena.py
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 python | |
# vim: set fileencoding=utf8 : | |
``` | |
$ pip install -U boto3 retrying | |
$ export AWS_DEFAULT_PROFILE=test | |
$ cat foo.sql | |
select count(*) | |
from bar | |
$ python athena.py foo.sql | |
$ ls -1 |
View kinesis-stream-state-diagram.dot
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
// $ dot -Tpng kinesis-stream-state-diagram.dot -o kinesis-stream-state-diagram.png | |
digraph kinesis_stream_status { | |
labelloc="t"; | |
label="AWS Kinesis Streams : Stream State Diagram"; | |
CreateStream[shape=box]; | |
DeleteStream[shape=box]; | |
MergeShards[shape=box]; | |
SplitShards[shape=box]; | |
IncreaseStreamRetentionPeriod[shape=box]; |
View sample-output-of-describe-auto-scaling-groups.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
{ | |
"AutoScalingGroups": [ | |
{ | |
"AutoScalingGroupARN": "arn:aws:autoscaling:ap-northeast-1:123456789012:autoScalingGroup:aaaaaaaa-35cb-4f11-bf21-258b69e3c42d:autoScalingGroupName/bar", | |
"HealthCheckGracePeriod": 300, | |
"SuspendedProcesses": [], | |
"DesiredCapacity": 0, | |
"Tags": [], | |
"EnabledMetrics": [], | |
"LoadBalancerNames": [], |
NewerOlder