Skip to content

Instantly share code, notes, and snippets.

@strophy
strophy / export_grafana_dashboards.sh
Created January 13, 2021 01:10 — forked from UdjinM6/export_grafana_dashboards.sh
Export all public Graphana dashboards
#!/bin/bash
full_url="http://your_graphana_host_here"
name="dashboards"
create_slug () {
echo "$1" | iconv -t ascii//TRANSLIT | sed -r s/[^a-zA-Z0-9]+/-/g | sed -r s/^-+\|-+$//g | tr A-Z a-z
}
process_db_json() {
@strophy
strophy / dash_budget_payout_dates.sh
Last active September 5, 2022 15:15 — forked from moocowmoo/dash_budget_payout_dates.sh
estimate future dash budget payout dates
#!/bin/bash
D0=$(TZ=UTC date --date="$(date --date="2015-12-07T08:27:12+0000")");
for block in `seq 398784 16616 $((382168 + (16616*48)))`;
do DD=$(TZ=UTC date --date="$(date --date="$D0") +727 hours +5 minutes +2 seconds");
D0=$DD;
echo "$block - $DD";
done