Skip to content

Instantly share code, notes, and snippets.

@dagbdagb
dagbdagb / gist:ea9f9588e73ad0e0e94900f367b793e5
Created May 23, 2024 15:38
patch for linux kernel - enable SPDIF for Hades Canyon
--- linux-6.9.1-gentoo/sound/pci/hda/patch_realtek.c 2024-05-23 17:29:07.122754646 +0200
+++ linux-6.9.1-gentoo-hadescanyon-audio/sound/pci/hda/patch_realtek.c 2024-05-23 17:30:34.768957600 +0200
@@ -4885,6 +4885,12 @@
}
}
+static void alc700_fixup_nuc_spdif(struct hda_codec *codec,
+ const struct hda_fixup *fix, int action)
+{
+ snd_hda_override_wcaps(codec, 0x6, 0x611);
@dagbdagb
dagbdagb / rpi-hdmi.sh
Created June 16, 2022 09:13 — forked from quelleck/rpi-hdmi.sh
Enable and disable the HDMI port on the Raspberry Pi: `rpi-hdmi on` to turn on, `rpi-hdmi off` to turn off.
#!/bin/sh
# Enable and disable HDMI output on the Raspberry Pi
is_off ()
{
vcgencmd display_power | grep "display_power=0" >/dev/null
}
case $1 in

source: Extensions/Distributed-Poller.md path: blob/master/doc/

Distributed Poller

Overview

Distributed Polling allows functions to be spread across additional servers for horizontal scaling. Distributed polling is not intended for geographically separated pollers.

dhcpd.conf, for ztp-upgrade
===================================================
set vendor-string = option vendor-class-identifier;
log-facility local7;
option space juniper;
option juniper.image-file-name code 0 = text;
option juniper.config-file-name code 1 = text;
option juniper.image-file-type code 2 = text;
diff --git a/includes/polling/cisco-remote-access-monitor.inc.php b/includes/polling/cisco-remote-access-monitor.inc.php
index 8236358..7f78128 100644
--- a/includes/polling/cisco-remote-access-monitor.inc.php
+++ b/includes/polling/cisco-remote-access-monitor.inc.php
@@ -37,7 +37,7 @@ if ($device['os_group'] == 'cisco') {
$data = snmp_get_multi($device, $oid_list, '-OUQs', 'CISCO-REMOTE-ACCESS-MONITOR-MIB');
$data = $data[0];
- if (is_numeric($data['crasEmailNumSessions']) && is_numeric($data['crasIPSecNumSessions']) && is_numeric($data['crasL2LNumSessions']) && is_numeric($data['crasLBNumSessions']) && is_numeric($data['crasSVCNumSessions']) && is_numeric($data['crasWebvpnNumSessions'])) {
+ if (is_numeric($data['crasIPSecNumSessions']) && is_numeric($data['crasL2LNumSessions']) && is_numeric($data['crasLBNumSessions']) && is_numeric($data['crasSVCNumSessions']) && is_numeric($data['crasWebvpnNumSessions'])) {
@dagbdagb
dagbdagb / cisco-cras.diff
Created March 11, 2020 18:13
Fix LibreNMS not showing Cisco ASA remote sessions
diff --git a/includes/html/graphs/device/cras_sessions.inc.php b/includes/html/graphs/device/cras_sessions.inc.php
index 7a89c04..b9f3aec 100644
--- a/includes/html/graphs/device/cras_sessions.inc.php
+++ b/includes/html/graphs/device/cras_sessions.inc.php
@@ -6,7 +6,6 @@ require 'includes/html/graphs/common.inc.php';
$rrd_filename = rrd_name($device['hostname'], 'cras_sessions');
-$rrd_options .= " DEF:email=$rrd_filename:email:AVERAGE";
$rrd_options .= " DEF:ipsec=$rrd_filename:ipsec:AVERAGE";