Skip to content

Instantly share code, notes, and snippets.

View vimagick's full-sized avatar
🐰
🐰🐰🐰🐰🐰🐰🐰🐰🐰

K̶e̶v̶i̶n̶ vimagick

🐰
🐰🐰🐰🐰🐰🐰🐰🐰🐰
View GitHub Profile
@vimagick
vimagick / README.md
Created July 6, 2026 05:08
go2rtc on windows
@vimagick
vimagick / README.md
Last active June 22, 2026 23:28
Windows Daemon
$ cd "C:\Program Files\SnowLuma"

# method A
$ mklink /d current v1.10.2

# method B
$ powershell -c "New-Item -ItemType SymbolicLink -Path current -Target v1.10.2"

$ dir
@vimagick
vimagick / 00-custom
Created June 15, 2026 00:25
Openwrt Button Debounce
#!/bin/sh
#
# File: /etc/hotplug.d/button/00-custom
#
logger -t "Button-Event" "Button: $BUTTON | Action: $ACTION | Duration: $SEEN"
if [ "$BUTTON" = "BTN_0" ] && [ "$ACTION" = "released" ] && [ "$SEEN" -gt 1 ]; then
logger -t "Button-Debounce" "Valid button release processed."
fi
@vimagick
vimagick / README.md
Created June 15, 2026 00:21
Openwrt UBUS Remote Access

Server

ssh root@192.168.1.1
vi /usr/share/rpcd/acl.d/anonymous.json
service rpcd restart && service uhttpd restart

Client

@vimagick
vimagick / README.md
Last active June 7, 2026 10:03
Linux NFS Server and Windows 11 NFS Client

Linux

$ sudo vim /etc/exports

# export all
$ sudo exportfs -r
$ sudo exportfs -v

# unexport all
@vimagick
vimagick / install.sh
Last active June 6, 2026 08:09
Sign in Node-RED with Github
$ open https://github.com/settings/developers
- Client ID: xxxxxx
- Client Secret: xxxxxxxxxxxx
$ docker compose exec --user root node-red bash
>>> npm install passport-github2
>>> vi settings.js
>>> exit
$ docker compose restart
# Doc: https://wiki.archlinux.org/title/Udev
#
# udevadm info --attribute-walk --name=/dev/input/event2
# udevadm control --reload
# udevadm trigger
#
KERNEL=="event[0-9]*", SUBSYSTEM=="input", SUBSYSTEMS=="input", ATTRS{id/vendor}=="2717", ATTRS{id/product}=="32b1", SYMLINK+="input/by-id/xiaomi-bt-rc", SYMLINK+="input/by-uuid/%s{uniq}"
KERNEL=="event[0-9]*", SUBSYSTEM=="input", SUBSYSTEMS=="input", ATTRS{id/vendor}=="00d2", ATTRS{id/product}=="0580", SYMLINK+="input/by-id/xiaoyi-bt-rc", SYMLINK+="input/by-uuid/%s{uniq}"
@vimagick
vimagick / install-golang.md
Created March 7, 2026 05:16
Install Golang on Raspberry Pi
@vimagick
vimagick / build.sh
Last active June 18, 2026 07:20
Build pre-configured ss-tunnel.pkg for macOS
#!/bin/bash
NAME=ss-tunnel
VERSION=1.24.0
PKG_ID=org.duckdns.easypi.$NAME
PKG_NAME=${NAME}_${VERSION}.pkg
DOWNLOAD_URL=https://github.com/shadowsocks/shadowsocks-rust/releases/download/v${VERSION}/shadowsocks-v${VERSION}.aarch64-apple-darwin.tar.xz
DOWNLOAD_DIR=./payload/usr/local/bin
mkdir -p $DOWNLOAD_DIR