Skip to content

Instantly share code, notes, and snippets.

View giuliomagnifico's full-sized avatar

Giulio Magnifico giuliomagnifico

View GitHub Profile
# HELP snmp_scrape_duration_seconds Total SNMP time scrape took (walk and processing).
# TYPE snmp_scrape_duration_seconds gauge
snmp_scrape_duration_seconds{module="ups_apc"} 3.536498993
# HELP snmp_scrape_packets_retried Packets retried for get, bulkget, and walk.
# TYPE snmp_scrape_packets_retried gauge
snmp_scrape_packets_retried{module="ups_apc"} 0
# HELP snmp_scrape_packets_sent Packets sent for get, bulkget, and walk; including retries.
# TYPE snmp_scrape_packets_sent gauge
snmp_scrape_packets_sent{module="ups_apc"} 271
# HELP snmp_scrape_pdus_returned PDUs returned from get, bulkget, and walk.
modules:
ups_apc:
walk:
- 1.3.6.1.2.1.33.1.2
- 1.3.6.1.2.1.33.1.3
- 1.3.6.1.2.1.33.1.4
- 1.3.6.1.2.1.33.1.6
- 1.3.6.1.2.1.33.1.7
- 1.3.6.1.2.1.33.1.8
- 1.3.6.1.4.1.318.1.1.1
#!/usr/bin/env bash
# shellcheck disable=SC2034
# shellcheck disable=SC1091
# shellcheck disable=SC2154
# PADD
#
# A more advanced version of the chronometer provided with Pihole
# SETS LOCALE
@giuliomagnifico
giuliomagnifico / WeatherLineSF full_wind.js
Last active September 19, 2024 16:49
WeatherLine full
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: yellow; icon-glyph: cloud;
// Widget Params
// Don't edit this, those are default values for debugging (location for Cupertino).
// You need to give your locations parameters through the widget params, more info below.
const widgetParams = JSON.parse((args.widgetParameter != null) ? args.widgetParameter : '{ "LAT" : "46.062" , "LON" : "13.242" , "LOC_NAME" : "Udine" }')
// WEATHER API PARAMETERS !important
@giuliomagnifico
giuliomagnifico / Mmeteo.js
Last active July 2, 2023 21:20
Minimal meteo for Scriptable
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: yellow; icon-glyph: magic;
// Widget Params
// Don't edit this, those are default values for debugging (location for Cupertino).
// You need to give your locations parameters through the widget params, more info below.
//const widgetParams = JSON.parse((args.widgetParameter != null) ? args.widgetParameter : '{ "LAT" : "37.32" , "LON" : "-122.03" , "LOC_NAME" : "Cupertino, US" }')
// WEATHER API PARAMETERS !important
// API KEY, you need an Open Weather API Key
@giuliomagnifico
giuliomagnifico / padd.sh
Created April 2, 2023 08:23
PADD for 800x480px display. See:
#!/usr/bin/env sh
# shellcheck disable=SC1091
# Ignore warning about `local` being undefinded in POSIX
# shellcheck disable=SC3043
# https://github.com/koalaman/shellcheck/wiki/SC3043#exceptions
# PADD
# A more advanced version of the chronometer provided with Pihole
@giuliomagnifico
giuliomagnifico / padd.sh
Last active January 7, 2023 16:22
Custom PADD layout for 800x480px displays
#!/usr/bin/env bash
# shellcheck disable=SC2034
# shellcheck disable=SC1091
# shellcheck disable=SC2154
# PADD
#
# A more advanced version of the chronometer provided with Pihole
# SETS LOCALE
@giuliomagnifico
giuliomagnifico / padd.sh
Created December 30, 2022 08:24
PADD v3.10.0 for Pi-Hole with 800x480px display
#### Remember to launch it without offset using '-xoff 0 -yoff 0'
#!/usr/bin/env sh
# shellcheck disable=SC1091
# Ignore warning about `local` being undefinded in POSIX
# shellcheck disable=SC3043
# https://github.com/koalaman/shellcheck/wiki/SC3043#exceptions
# PADD
#!/usr/bin/env sh
# shellcheck disable=SC1091
# Ignore warning about `local` being undefinded in POSIX
# shellcheck disable=SC3043
# https://github.com/koalaman/shellcheck/wiki/SC3043#exceptions
# PADD
# A more advanced version of the chronometer provided with Pihole
@giuliomagnifico
giuliomagnifico / padd.sh
Created October 15, 2022 06:01
padd.sh v3.8.1 for 800x480px display:
#!/usr/bin/env sh
# shellcheck disable=SC1091
# PADD
# A more advanced version of the chronometer provided with Pihole
# SETS LOCALE
# Issue 5: https://github.com/jpmck/PADD/issues/5
# Updated to en_US to support
# export LC_ALL=en_US.UTF-8 > /dev/null 2>&1 || export LC_ALL=en_GB.UTF-8 > /dev/null 2>&1 || export LC_ALL=C.UTF-8 > /dev/null 2>&1