I hereby claim:
- I am prog893 on github.
- I am prog893 (https://keybase.io/prog893) on keybase.
- I have a public key ASB6us59KKAc3KzR88kcY3_I5mTfGJQQIXBn4TTHyEPO-Ao
To claim this, I am signing this object:
| module "hoge" { | |
| source = "baikonur-oss/iam-nofile/aws" | |
| version = "1.0.2" | |
| ... | |
| } |
| module "iam" { | |
| source = "baikonur-oss/iam-nofile/aws" | |
| version = "v2.0.0" | |
| name = "example_name" | |
| type = "ec2" | |
| policy_json = <<EOF | |
| { |
| module "fargate_scheduled_task" { | |
| source = "baikonur-oss/fargate-scheduled-task/aws" | |
| version = "2.0.2" | |
| name = "sample-batch" | |
| schedule_expression = "cron(0 0 1 * ? *)" | |
| target_cluster_arn = "example_cluster" | |
| task_definition_arn = aws_ecs_task_definition.batch.arn |
I hereby claim:
To claim this, I am signing this object:
| # Prerequisites: awscli, jq | |
| ## Show role details for a Lambda function | |
| function get-function-role() { | |
| aws lambda get-function --function-name "$1" | jq '.Configuration.Role' -j | sed 's/.*\///' | xargs aws iam get-role --role-name | jq | |
| } | |
| ## Show Lambda function resource-based policy | |
| # Useful for debugging integration with other services (like API Gateway, ALB and EventBridge) | |
| # since permissions for invocations from them are written here |
| #!/bin/bash | |
| # not intended to be run as a script, some steps require GUI actions | |
| # install Rosetta 2 | |
| softwareupdate --install-rosetta | |
| # switch to i386 | |
| # using full path here to prevent Homebrew-provided zsh, which is only arm64, to be invoked and return errors | |
| arch -x86_64 /bin/zsh |
This Python script helps you to organize your files in a unique and efficient way. It performs three main tasks:
(optional, off by default) Rename Files: The script helps you organize your files by slightly adjusting the way your folders are named. Imagine you have a file in a subfolder like this: X/A/B/file.txt. The script will change this to: X A/B/file.txt. This means that the deepest level of your folder structure is brought up one level. This can make it easier to see the overall structure of your files and folders at a glance.
Delete Duplicate Files: The script identifies duplicate files based on their SHA-256 hashes. For each group of duplicates, it asks the user to choose which file to keep and deletes the rest. The user is presented with an alphabetically sorted list of file paths and can either enter the number of the file to keep or press enter to choose the shortest file path by default.
Delete Empty Directories: After moving and deleting files, so
| ### Glue pythonshell script to test connectivity to DocumentDB in VPC with TLS, without internet access | |
| # make sure to configure connections to provision an ENI in VPC for network access: | |
| # https://docs.aws.amazon.com/glue/latest/dg/glue-connections.html | |
| ### install packages from script to avoid pip calling PyPI for deps | |
| # considering wheels and CA bundle are available at S3 bucket | |
| import boto3 | |
| import subprocess |
| #!/bin/bash | |
| # Usage: ./iam_describe_role.sh ROLE_NAME | |
| # Prerequisites: awscli and jq | |
| if [ -z "$1" ]; then | |
| echo "Role name not provided" >&2 | |
| exit 1 | |
| fi |
A bash script that creates and verifies SHA-256 sidecar files for data integrity checking. Perfect for protecting important files on NVMe drives, external storage, or any filesystem.