Skip to content

Instantly share code, notes, and snippets.

bucket_list=$(aws s3api list-buckets --no-paginate | jq -r '.Buckets[].Name')
while read -r bucket ; do
echo -n "${bucket},"
aws cloudwatch get-metric-statistics --namespace AWS/S3 --start-time "$yesterday" --end-time "$current_time" --period 86400 --statistics Average --region us-east-1 --metric-name BucketSizeBytes --dimensions Name=BucketName,Value=$bucket Name=StorageType,Value=StandardStorage | jq '(.Datapoints[0].Average // 0)'
done <<< "$bucket_list"
# The containers configuration file specifies all of the available configuration
# command-line options/flags for container engine tools like Podman & Buildah,
# but in a TOML format that can be easily modified and versioned.
# Please refer to containers.conf(5) for details of all configuration options.
# Not all container engines implement all of the options.
# All of the options have hard coded defaults and these options will override
# the built in defaults. Users can then override these options via the command
# line. Container engines will read containers.conf files in up to three
# locations in the following order:
# 1. /usr/share/containers/containers.conf
@paul-civitas
paul-civitas / grouphack.tf
Created May 31, 2022 17:01
Hack to get twingate group information from terraform
# export TF_VAR_TWINGATE_API_TOKEN="$TWINGATE_API_TOKEN"
variable TWINGATE_API_TOKEN {
type = string
}
locals {
twingate-query-string = <<EOT
{
groups {
edges {