Skip to content

Instantly share code, notes, and snippets.

View lapo-luchini's full-sized avatar

Lapo Luchini lapo-luchini

View GitHub Profile
@lapo-luchini
lapo-luchini / change-favicon-from-CSS.js
Last active May 4, 2021 03:07 — forked from mathiasbynens/change-favicon.js
Dynamically change favicon from CSS. (does not work on Internet Explorer and Safari)
/*! dynamically change favicon from CSS (does not work on Internet Explorer and Safari)
*
* use with:
* <link id='linkCSS' href='my.css' type='text/css' rel='stylesheet' />
* <link id='favicon' rel="shortcut icon" href="../images/favicon.png" type="image/png" />
*
* my.css can contain:
* #favicon { background-image: url(any valid URL); }
*/
@lapo-luchini
lapo-luchini / smartmon_exporter.sh
Last active February 19, 2021 16:13 — forked from hadret/smartmon.sh
smartmon.sh script adapted for FreeBSD
#!/bin/sh
# Script informed by the collectd monitoring script for smartmontools (using smartctl)
# by Samuel B. <samuel_._behan_(at)_dob_._sk> (c) 2012
# source at: http://devel.dob.sk/collectd-scripts/
# TODO: This probably needs to be a little more complex. The raw numbers can have more
# data in them than you'd think.
# http://arstechnica.com/civis/viewtopic.php?p=22062211
# can be add to /etc/crontab like this, and node_exporter will see it automatically: