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 | |
| """Convert a BCA (Bank Central Asia) e-Statement PDF to CSV. | |
| Pure standard library (zlib + re + csv). BCA e-statements embed the whole | |
| transaction table in a single FlateDecode content stream, drawn as positioned | |
| text (Tm / Tj operators) with a monospace font at fixed column x-positions. | |
| This script decompresses that stream, rebuilds rows by their y-coordinate and | |
| columns by their x-coordinate, and writes a CSV in the exact layout the sibling | |
| `bca.yaml` unifier config consumes: |
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
| 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 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
| #!/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 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
| package main | |
| import ( | |
| "errors" | |
| "log" | |
| "os" | |
| "github.com/playwright-community/playwright-go" | |
| ) |
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
| #!/bin/bash | |
| # Color codes for output | |
| RED='\033[0;31m' | |
| GREEN='\033[0;32m' | |
| YELLOW='\033[1;33m' | |
| NC='\033[0m' # No Color | |
| print_usage() { | |
| SCRIPT_NAME=$(basename "$0") |
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
| #!/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 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 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 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
| #!/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 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
| #!/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 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
| # 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: |
NewerOlder