This file contains hidden or 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 python3 | |
| """ | |
| Steam inventory dumper with JSON output. | |
| Output formats: | |
| - Default: Pretty-printed JSON with nested structure | |
| - --flat: JSONL (one item per line) for streaming/grep | |
| Examples: | |
| ./steam_inventory.py <steamid64> |
This file contains hidden or 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
| """ | |
| This simply functions as a reverse-proxy to a Jenkins job. | |
| It allows granting the source access only to this specific action, | |
| instead of requiring direct network access to the Jenkins server. | |
| """ | |
| from os import getenv | |
| from urllib.parse import quote | |
| from urllib.request import Request, urlopen |
This file contains hidden or 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
| # shellcheck disable=SC2154 | |
| "${tail_command[@]}" | while read -r datetime rest; do | |
| new_datetime=$("${DATEUTIL}" -d "${datetime} UTC" +"%d/%m/%y %H:%M:%S") | |
| echo "${new_datetime} ${rest}" | |
| done |
This file contains hidden or 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
| # shellcheck disable=SC2086 | |
| set -o allexport | |
| source .env | |
| set +o allexport | |
| cluster_args="--cluster ${ECS_CLUSTER} --region ${REGION}" | |
| net_config="{\"awsvpcConfiguration\":{\"assignPublicIp\":\"XXX\",\"subnets\":[\"${SUBNET_ID}\"]}}" | |
| task_arn=$(aws ecs run-task ${cluster_args} \ | |
| --task-definition "${ECS_TASK_DEF_ARN}" --launch-type FARGATE \ |
This file contains hidden or 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 ghcr.io/apache/flink-kubernetes-operator:xxxxx | |
| ARG PLUGINS="flink-s3-fs-hadoop flink-s3-fs-presto" | |
| ENV FLINK_PLUGINS_DIR=/opt/flink/plugins | |
| ENV BASE_PLUGIN_JARS_URL=https://repo1.maven.org/maven2/org/apache/flink | |
| RUN cd ${FLINK_PLUGINS_DIR} \ | |
| && flink_version=$(ls ./flink-metrics-prometheus | cut -d"-" -f4 | sed "s/.jar//") \ | |
| && for plugin in ${PLUGINS}; \ |
This file contains hidden or 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
| # shellcheck disable=SC2086 | |
| docker images -q "${DOCKER_REPO_FULL}" | \ | |
| grep -v "$(docker images -q ${DOCKER_IMAGE})" | \ | |
| xargs --no-run-if-empty docker rmi -f |
This file contains hidden or 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 itertools import islice | |
| from subprocess import run | |
| from tempfile import NamedTemporaryFile | |
| from time import sleep | |
| from typing import NamedTuple | |
| import kubernetes.client | |
| import kubernetes.config | |
| import prometheus_client |
This file contains hidden or 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
| class EndpointFilter(Filter): | |
| """A generic way to filter out web endpoints from the logs.""" | |
| # pylint: disable=too-few-public-methods | |
| def __init__( | |
| self, | |
| path: str, | |
| *args, | |
| **kwargs, |
This file contains hidden or 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
| locals { | |
| broker_fqdns = [for broker in split(",", aws_msk_cluster.kafka.bootstrap_brokers_tls) : | |
| trimsuffix(broker, ":${var.msk_port}")] | |
| broker_addrs = { for broker in data.dns_a_record_set.brokers : broker.addrs[0] => broker.host } | |
| pl_relevant_enis = (var.enable_privatelink ? [for eni in data.aws_network_interface.brokers : | |
| merge({ public_fqdn = local.broker_addrs[eni["private_ip"]] }, eni) | |
| if contains(keys(local.broker_addrs), eni["private_ip"])] : []) |
This file contains hidden or 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
| provision() { | |
| xx() { | |
| : | |
| } | |
| yy() { | |
| : | |
| } | |
| zz() { |
OlderNewer