tar -cv --zstd --options zstd:compression-level=22 --options zstd:threads=0 -f archive.tar.zstd files_to_compress/Tested with bsdtar 3.5.3 (macOS 15.7.1)
| #!/bin/bash | |
| set -euo pipefail | |
| if [[ "$UID" -ne 0 ]]; then | |
| echo "This script needs to be executed as root" | |
| exit 1 | |
| fi | |
| vendor_id="0x3000" # Valve |
tar -cv --zstd --options zstd:compression-level=22 --options zstd:threads=0 -f archive.tar.zstd files_to_compress/Tested with bsdtar 3.5.3 (macOS 15.7.1)
| #!/bin/bash | |
| set -euo pipefail | |
| backup() { | |
| terraform state pull > state-$(gdate -Iseconds) | |
| } | |
| plan() { | |
| backup | |
| terraform plan -out=tfplan && terraform show -json tfplan | jq . > tfplan.json |
| #!/bin/bash -euo pipefail | |
| ## Gives you a nice overview over the total timeseries cardinality of a prometheus endpoint. | |
| curl -fsSL http://localhost:9100/metrics | grep -v '^#' | cut -d'{' -f 1 | cut -d' ' -f 1 | sort | uniq -c | sort -gr |
| public class DateTimeInsanityTests | |
| { | |
| [Fact] | |
| public void YourDateTimeIsInsane() | |
| { | |
| var t = new DateTime(); | |
| // Does not throw | |
| Console.WriteLine(new DateTimeOffset(t.ToUniversalTime())); |
| #!/usr/bin/env sh | |
| # Special shebang: almost the same as just `uv run`, but always use the script directory to search for pyproject.toml. | |
| # The following lines are ignored by python, and executed by bash | |
| # Use `set -x` if you want to see what's happening | |
| """:" | |
| set -eu | |
| exec uv run --project=$(dirname "$0") "$0" "$@" | |
| """ | |
| ### |
SevDesk is a useful tool, but on my 13" MacBook, I find it wastes too much whitespace on menu elements and such, which makes it hard to keep an overview.
These styles can easily be applied using StyleBot or your CSS-tweaking tool of choice.
Some aspect ratios will look yanky with this applied, so YMMV.
This is a custom PicoC program to parse the SML energy readings in a tibber+Loxone setup.
Our system runs a [tibber Pulse], connected to a [EMH ED300L][ED300L] energy meter. We run this code on a [Loxone Miniserver][loxone], which can run custom PicoC code.
We use the TCP stream method to read the current SML data packet from the tibber bridge