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
Last active August 23, 2026 12:17
get domain & ssl expiry date
$ rdap -j google.com | jq '.events[] | select(.eventAction=="expiration").eventDate | fromdate'
1852516800

$ rdap -j -s https://rdap.nic.us/ china.us | jq '.events[] | select(.eventAction=="expiration").eventDate | fromdate'
1808524799

$ curl -s https://data.iana.org/rdap/dns.json | jq '.services | map(.[0][] as $tld | {key: $tld, value: .[1][0]}) | from_entries | with_entries(select(.key | IN("com","net","org")))'
{
 "org": "https://rdap.publicinterestregistry.org/rdap/",
@vimagick
vimagick / README.md
Created August 18, 2026 07:32
Remote Browser MCP Demo
# MCP Server
$ mcp-proxy --transport streamablehttp --host 0.0.0.0 --port 8931 -- npx -y @playwright/mcp --isolated

# MCP Client
$ chatgpt -n -i --tools --mcp http://localhost:8931/mcp
@vimagick
vimagick / README.md
Created July 21, 2026 03:39
Static build lame for mp3 encoding

Build on Raspberry Pi OS

# Download source code from https://lame.sourceforge.io/download.php
tar xzf lame-4.0.tar.gz && cd lame-4.0
./configure --prefix=/usr/local --enable-static --disable-shared --disable-decoder
make -j$(nproc)
ldd frontend/lame
@vimagick
vimagick / README.md
Last active July 18, 2026 10:03
Install Shadowsocks on OpenWrt
@vimagick
vimagick / README.md
Last active July 18, 2026 23:38
Cleanup PuTTY Inactive Sessions
image
@vimagick
vimagick / README.md
Created July 15, 2026 08:39
Make Raspberry Pi OS on macOS without Imager
$ diskutil list
/dev/disk2 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *30.8 GB    disk2
   1:             Windows_FAT_32 bootfs                  536.9 MB   disk2s1
   2:                      Linux                         30.2 GB    disk2s2

$ diskutil umountDisk disk2
Unmount of all volumes on disk2 was successful
@vimagick
vimagick / README.md
Last active July 11, 2026 04:12
Run multiple sslocal http proxy instances on openwrt

Extract binary from ipk

URL=$(curl -s https://api.github.com/repos/Openwrt-Passwall/openwrt-passwall2/releases/latest | jq -r '.assets[]|select(.name=="passwall_packages_ipk_arm_cortex-a9_vfpv3-d16.zip").browser_download_url')
wget -O bundle.zip $URL
unzip -j bundle.zip '*-sslocal_*.ipk'
tar xzf *-sslocal_*.ipk ./data.tar.gz
tar xzf data.tar.gz ./usr/bin/sslocal --strip-components=3
@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