This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
""" | |
2017-10 by [email protected] | |
using protocol reverse engineered by audiohacked: https://github.com/audiohacked/OpenCorsairLink | |
""" | |
import usb1, struct, threading | |
from http.server import HTTPServer | |
from client_python.prometheus_client.core import Metric, REGISTRY |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pfsense: | |
version: 2 | |
auth: | |
community: public | |
walk: | |
- 1.3.6.1.4.1.12325.1.200.1.1 #SNMPv2-SMI::enterprises::BEGEMOT-PF-MIB::pfStatus | |
- 1.3.6.1.4.1.12325.1.200.1.2 #SNMPv2-SMI::enterprises::BEGEMOT-PF-MIB::pfCounter | |
- 1.3.6.1.4.1.12325.1.200.1.3 #SNMPv2-SMI::enterprises::BEGEMOT-PF-MIB::pfStateTable | |
#not interesting | |
#- 1.3.6.1.4.1.12325.1.200.1.4 #SNMPv2-SMI::enterprises::BEGEMOT-PF-MIB::pfSrcNodes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#http://www.oidview.com/mibs/0/IF-MIB.html | |
#http://www.net-snmp.org/docs/mibs/interfaces.html | |
cisco_custom: | |
version: 2 | |
auth: | |
community: public | |
walk: | |
- 1.3.6.1.2.1.2.2.1 | |
- 1.3.6.1.2.1.31.1.1.1 | |
metrics: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import urbackup_api | |
def floatWithDefault(x, default=0.0): | |
try: | |
return float(x) | |
except ValueError: | |
return default |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import os, subprocess, sys | |
from contextlib import suppress | |
if "-h" in sys.argv: | |
with suppress(subprocess.CalledProcessError): | |
print(subprocess.check_output(["lspci", "-h"], universal_newlines=True)) | |
exit(0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
include $(TOPDIR)/rules.mk | |
PKG_NAME:=scandir | |
PKG_VERSION:=1.3 | |
PKG_RELEASE:=1 | |
PKG_SOURCE:=v$(PKG_VERSION).tar.gz | |
PKG_SOURCE_URL:=https://github.com/benhoyt/scandir/archive/ | |
PKG_BUILD_DIR:=$(BUILD_DIR)/scandir-$(PKG_VERSION) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
""" | |
turn the fan to dc mode and off when the fan controller is initialized | |
/etc/udev/rules.d/97-hwmon.rules: | |
ACTION=="add", SUBSYSTEM=="hwmon", DRIVERS=="nct6775", ATTR{pwm5_mode}="0", ATTR{pwm5_enable}="1", ATTR{pwm5}="0" | |
declare the disk as hotpluggable and run the script | |
/etc/udev/rules.d/98-sata.rules: | |
ACTION=="add", SUBSYSTEM=="scsi_host", DRIVERS=="sata_sil24", ENV{UDISKS_SYSTEM_INTERNAL}="0" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
chip "nct6793-isa-0290" | |
label in0 "CPUVCORE" | |
compute in0 @*2, @/2 | |
label in1 "VIN0" | |
label in2 "AVCC" | |
label in3 "3VCC" | |
label in4 "VIN1" | |
label in5 "VIN2" | |
label in6 "VIN3" | |
label in7 "3VSB" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
from pulsectl import Pulse, pulsectl | |
from collections import Counter | |
import logging | |
from systemd import journal | |
log = logging.getLogger("sink-switcher") | |
log.setLevel(logging.DEBUG) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local event = require("event") | |
local term = require("term") | |
local component = require("component") | |
gpu = component.gpu | |
local w, h = gpu.getResolution() | |
local prevX = nil | |
local prevY = nil | |
local prevZ = nil |
NewerOlder