Skip to content

Instantly share code, notes, and snippets.

View rm1138's full-sized avatar
🦀

Ricky Lam rm1138

🦀
View GitHub Profile
@rm1138
rm1138 / cam_ptz.sh
Created April 5, 2026 07:13
eMeet Pixy (328f:00c0) PTZ and HID control for Linux - reverse-engineered tracking, privacy, gesture, and audio mode commands
#!/usr/bin/env bash
# PTZ and mode control for eMeet Pixy webcam (USB 328f:00c0)
# Uses v4l2-ctl for PTZ and HID for tracking/idle mode
# Usage: cam_ptz.sh <command> [value]
#
# --- How the HID protocol was reverse-engineered ---
#
# The eMeet Pixy exposes two control interfaces:
# 1. UVC (standard) — pan/tilt/zoom/focus via v4l2-ctl
# 2. HID (proprietary) — tracking, audio, gesture, privacy via /dev/hidrawN
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">