Skip to content

Instantly share code, notes, and snippets.

View CMoH's full-sized avatar

Ciprian Ciubotariu CMoH

  • Timișoara, Romania
View GitHub Profile
@CMoH
CMoH / telegraf-mdstat-health.sh
Created November 13, 2018 17:06
Telegraf exec script for md (device mapper) devices
#!/bin/bash
#
# telegraf plugin for mdstat monitoring
#
# output fields:
# - measurement: mdstat
# - tags:
# - host: hostname
# - dev: md device name (md0, md1 etc)
# - fields:
@CMoH
CMoH / gitpr-fetch
Created July 27, 2018 12:14
Github PR tools
#!/bin/bash
# it may be worth investigating curl on the pr to do something about the user
if [ "x" == "x$1" ] ; then
echo "Usage: gitpr-fetch <pr> [remote]"
exit 1
fi
branch="pr-$1"
remote="upstream"
if [ "x" != "x$2" ] ; then
remote="$2"