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 | |
set -eo pipefail | |
if [[ $# -ne 1 ]]; then | |
echo "Usage: $0 <repo-name>" | |
exit 1 | |
fi | |
REPO_NAME="$1" |
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 | |
# Fetch instance types | |
instance_types=$(aws ec2 describe-instance-types --region us-east-1 \ | |
--filters "Name=processor-info.supported-architecture,Values=arm64_mac" \ | |
| jq -r '.InstanceTypes[].InstanceType' | sed 's/\.metal//g') | |
# Loop through each instance type and fetch pricing information | |
for instance_type in $instance_types; do | |
aws pricing get-products --service-code AmazonEC2 \ |
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
. { | |
bind lo | |
#forward . /etc/resolv.dhcp.conf | |
forward . tls://1.1.1.1 tls://1.0.0.1 { | |
tls_servername cloudflare-dns.com | |
} | |
cache { | |
success 99840 259200 600 | |
serve_stale | |
} |
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
FROM public.ecr.aws/amazonlinux/amazonlinux:minimal | |
RUN microdnf -y install e2fsprogs bash mdadm util-linux && microdnf clean all | |
ADD setup-runtime-storage.sh ./ | |
ENTRYPOINT ["/bin/bash", "setup-runtime-storage.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
# Copyright (c) 2024 Andrew Grigorev <[email protected]> | |
# | |
# This software is licensed under the MIT License. Redistribution and use are permitted | |
# provided that the license terms are met. For details, see the MIT License: | |
# https://opensource.org/licenses/MIT | |
import sys | |
from functools import reduce | |
from operator import mul |
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 | |
# Usage: tfe-api <endpoint> [<jq filter>] | |
set -euo pipefail | |
if [ $# -lt 1 ] || [ -z "${TF_TOKEN_app_terraform_io:-}" ]; then | |
[ $# -lt 1 ] && echo "Usage: tfe-api <endpoint> [<jq filter>]" >&2 | |
[ -z "${TF_TOKEN_app_terraform_io:-}" ] && echo "TF_TOKEN_app_terraform_io is not set" >&2 | |
exit 1 | |
fi |
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
module get-caller-identity | |
go 1.22.1 | |
require ( | |
github.com/aws/aws-sdk-go-v2 v1.26.2 | |
github.com/aws/aws-sdk-go-v2/config v1.27.14 | |
github.com/aws/aws-sdk-go-v2/service/sts v1.28.8 | |
) |
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 | |
""" | |
This script is used to refresh the session token for the AWS CLI. | |
It maintains credentials in the AWS_SHARED_CREDENTIALS_FILE file, and | |
refreshes the session token when it is about to expire. | |
It relies on the following tools: | |
- pass: a password manager |
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 | |
# | |
# Draw OSM geometries over each other projected to 1km units | |
# | |
# Install requirements: | |
# pip install osmnx matplotlib | |
# | |
# Usage: | |
# draw-projected "Cyprus island" "RU-MOW" | |
# |
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
name = radiusd | |
prefix = "" | |
logdir = "/var/log/radius" | |
run_dir = "/var/run/radiusd" | |
libdir = "/usr/lib/freeradius" | |
debug_level = 2 | |
proxy_requests = no | |
raddbdir = "/etc/raddb" | |
certdir = "${raddbdir}/certs" |
NewerOlder