Skip to content

Instantly share code, notes, and snippets.

View rm1138's full-sized avatar
🦀

Ricky Lam rm1138

🦀
View GitHub Profile
blueprint:
name: ZHA - Moes Smart Knob for Media Player
description: 'Control Media Player with a Moes Smart Knob. You can set functions for a
single press. This allows you to assign, e.g., a scene or anything else. Rotating
left/right will change the volume smoothly of the selected media player. Not all
functionality of the device is available at time of writing, e.g. double press,
long press.
Original blueprint by seamus65 (https://gist.github.com/seamus65/939a147634942dd885c8704334627f93).
@rm1138
rm1138 / check_zfs_health.sh
Last active March 12, 2021 08:57
ZFS pool status checker, use this with cron job and healthchecks.io. The first argument is the number of pool in your system.
#!/bin/sh
ONLINE_COUNT=`zpool status | grep 'state: ONLINE' | wc -l`
if [ "$ONLINE_COUNT" = "$1" ]
then
exit 0
else
exit 1
fi
#!/bin/sh
# /etc/X11/xinit/xinitrc
#
# global xinitrc file, used by all X sessions started by xinit (startx)
# invoke global X session script
xinput set-prop "pointer:SINO WEALTH Gaming Keyboard" "libinput Button Scrolling Button" 3
xinput set-prop "pointer:SINO WEALTH Gaming Keyboard" "libinput Scroll Method Enabled" 0 0 1
#!/bin/sh
synclient FingerLow=10
synclient TapButton2=0
synclient TapButton3=0
synclient ClickFinger2=0
synclient ClickFinger3=0
synclient VertTwoFingerScroll=0
touchegg
<touchégg>
<settings>
<property name="composed_gestures_time">0</property>
</settings>
<application name="All">
<gesture type="DRAG" fingers="4" direction="UP">