Skip to content

Instantly share code, notes, and snippets.

(2 * 2 * 5 * 7 * 37 * 149 * 5417 * 148781 * 51939996061871).to_s(16).scan(/../).map { |x| x.hex.chr }.join
@infertux
infertux / rrd-dump.sh
Created December 19, 2016 12:06
Bash scripts to export/import RRD files for Collectd
#!/bin/bash -eu
cd /var/lib/collectd/rrd/$HOST
for f in $(find -name *.rrd); do
echo "rrdtool dump $f"
rrdtool dump $f > ${f%.rrd}.xml
done
rsync -avz --exclude *.rrd /var/lib/collectd/rrd/$HOST/ $COLLECTD_HOST:/var/lib/collectd/rrd/$HOST/
@infertux
infertux / hockeypuck.deb.sh
Created May 28, 2022 04:57
Script to build Hockeypuck .deb package using Docker
#!/bin/bash
set -euxo pipefail
cd "$(dirname "$0")"
target="${1:-hockeypuck}"
interactive="${2:-}"
container=${target}-builder
volume=/root/HOST