Skip to content

Instantly share code, notes, and snippets.

@alwynallan
alwynallan / Makefile
Last active June 21, 2024 18:53
Hardware PWM Controller for the Raspberry Pi 4 Case Fan
CC = gcc
RM = rm -f
INSTRUMENT_FOR_PROMETHEUS := false
ifeq ($(INSTRUMENT_FOR_PROMETHEUS),true)
CFLAGS = -Wall -DINSTRUMENT_FOR_PROMETHEUS
LIBS = -lbcm2835 -lprom -lpromhttp -lmicrohttpd
else
CFLAGS = -Wall
@reachlin
reachlin / prometheus.yml
Created April 19, 2017 07:06
sample prometheus configuration explained
// For all the confusing Prometheus configuration and
// regular expressions,
// explained in examples.
// Remember, there are default values for each item if it's missing.
// regex is (.*),
// replacement is $1,
// separator is ;
// ,and action is replace
@andy-s-clark
andy-s-clark / lock_screen
Created April 2, 2017 07:31
Hack to change HipChat status to away when locking screen
#!/bin/bash
# Hack to change HipChat status to away when locking screen. This could be less
# hacky by connecting to hipchat using the "--message" option. However, this
# option only appears to support "about", "logout", "quit" and "wakeup"
#
# Tested in KDE (Kubuntu 16.10)
#
# Change HipChat status to away -> Lock screen -> Change HipChat status to
# available after screen is unlocked