Skip to content

Instantly share code, notes, and snippets.

View alburkerk's full-sized avatar

alburkerk alburkerk

View GitHub Profile
@alburkerk
alburkerk / analyze_field_sizes.js
Created September 24, 2025 08:46
Analyse the result of a POST {index_name}/_disk_usage?human=true&run_expensive_tasks=true request on an elastic search indice
#!/usr/bin/env node
const fs = require("fs");
const path = require("path");
function parseSize(sizeStr) {
if (!sizeStr || sizeStr === "0b") return 0;
const units = {
b: 1,
@alburkerk
alburkerk / wait-for-it.sh
Created June 25, 2021 11:25
Wait for a TCP port to be available
#!/usr/bin/env bash
# Use this script to test if a given TCP host/port are available
cmdname=$(basename $0)
echoerr() { if [[ $QUIET -ne 1 ]]; then echo "$@" 1>&2; fi }
usage()
{
cat << USAGE >&2