Skip to content

Instantly share code, notes, and snippets.

View dsiebel's full-sized avatar

Dominik Siebel dsiebel

View GitHub Profile
@dsiebel
dsiebel / README.md
Last active November 5, 2025 15:08
Solar Power Zero Grid Export - Home Assistant Automation
@dsiebel
dsiebel / boostrap.sh
Created June 2, 2021 07:30
Minimal bash script template
#!/usr/bin/env bash
# Original version: https://betterdev.blog/minimal-safe-bash-script-template/
# Minor adjustments for positional arguments, debug output, remove colors and such.
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
#script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
script_name=$(basename "${BASH_SOURCE[0]}")
@dsiebel
dsiebel / build.sh
Last active April 9, 2020 08:30
A Dockerfile for https://octant.dev/
#!/usr/bin/env bash
OCTANT_IMAGE=dsiebel/octant
OCTANT_VERSION=0.11.1
docker build \
--tag ${OCTANT_IMAGE}:${OCTANT_VERSION} \
--build-arg OCTANT_VERSION=${OCTANT_VERSION} \
--file ./octant.Dockerfile \
.
@dsiebel
dsiebel / list_gcp_ipranges.sh
Last active May 7, 2018 15:16 — forked from n0531m/list_gcp_iprange.sh
Google Cloud Platform : ip address range
#!/usr/bin/env bash
[[ -v VERBOSE ]] && set -x
set -eu
# This script lists all ip ranges currently used by
# the google cloud platform, according to ns-lookup / dig
# TXT _cloud-netblocks.googleusercontent.com
#
# https://cloud.google.com/compute/docs/faq#ipranges
#
@dsiebel
dsiebel / uk_postcode_regex.pl
Last active April 28, 2022 06:41
UK postcode regex
(GIR 0AA)|(((A[BL]|B[ABDHLNRSTX]?|C[ABFHMORTVW]|D[ADEGHLNTY]|E[HNX]?|F[KY]|G[LUY]?|H[ADGPRSUX]|I[GMPV]|JE|K[ATWY]|L[ADELNSU]?|M[EKL]?|N[EGNPRW]?|O[LX]|P[AEHLOR]|R[GHM]|S[AEGKLMNOPRSTY]?|T[ADFNQRSW]|UB|W[ADFNRSV]|YO|ZE)[1-9]?[0-9]|((E|N|NW|SE|SW|W)1|EC[1-4]|WC[12])[A-HJKMNPR-Y]|(SW|W)([2-9]|[1-9][0-9])|EC[1-9][0-9]) [0-9][ABD-HJLNP-UW-Z]{2})