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
connectors: | |
spanmetrics: | |
histogram: | |
explicit: | |
buckets: [100us, 1ms, 2ms, 6ms, 10ms, 100ms, 250ms] | |
dimensions: | |
- name: http.method | |
default: GET | |
- name: http.status_code | |
exemplars: |
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/sh | |
print_usage() { | |
SCRIPT_NAME=$(basename "$0") | |
echo "Simple wrapper of docker compose to add labels to force the container re-creation when config files are updated" | |
echo "Example: $SCRIPT_NAME -f compose.custom.yaml up -d" | |
exit "$1" | |
} | |
FILES_ARG= |
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
package main | |
import ( | |
"errors" | |
"log" | |
"os" | |
"github.com/playwright-community/playwright-go" | |
) |
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 | |
PATH_TO_WATCH=$1 | |
COMMAND=$2 | |
trap printout SIGINT | |
printout() { | |
echo "" | |
1>&2 echo "Watch path terminated forcefully" | |
exit |
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/sh | |
set -e | |
REPO_DIR=$1 | |
if [ -z "$REPO_DIR" ]; then | |
REPO_DIR="./" | |
fi | |
REPO_DIR=$(git rev-parse --show-toplevel) | |
if [ "$REPO_DIR" = ".git" ]; then |
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 bash | |
DIR=$1 | |
cd "$DIR" | |
for d in */ ; do | |
if [[ "$d" =~ .*\([0-9\-]+\).* ]]; then | |
date=$(echo $d | sed "s/.*(//" | sed "s/)\///") | |
new_name="$date - $(echo $d | sed "s/$date//" | sed "s/ ()//")" | |
if [ ! -d "$new_name" ]; then | |
mv "$d" "$new_name" |
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/sh | |
DIR=$1 | |
EXTENSIONS_LIST="(MOV|MP4|AVI)" | |
HANDBRAKE_CLI=HandBrakeCLI | |
find_files() { | |
find "$DIR" -type f 2> /dev/null | egrep -i "\.$EXTENSIONS_LIST" | egrep -i --invert-match ".*_s\.$EXTENSIONS_LIST" | egrep --invert-match "/\." | |
} |
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/sh | |
DIR=$1 | |
if [ -z "$DIR" ]; then | |
DIR=./ | |
fi | |
if [ ! -d "$DIR" ]; then | |
1>&2 echo "Invalid dir: $DIR" | |
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
# source: https://alexwlchan.net/2019/05/finding-unused-variables-in-a-terraform-module/ | |
# import os | |
# import sys | |
# import hcl | |
# def get_variables_in_file(path): | |
# try: |
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 | |
""" | |
sort terraform variables | |
it's easy to do, just follow these steps: | |
python sort_terraform_variables.py variables.tf > sorted_variables.tf | |
mv sorted_variables.tf variables.tf | |
""" | |
from __future__ import print_function | |
import sys |
NewerOlder