Skip to content

Instantly share code, notes, and snippets.

View lideming's full-sized avatar
💭
I may be slow to respond.

lideming lideming

💭
I may be slow to respond.
View GitHub Profile
@lideming
lideming / readme_socket_activation.md
Last active October 24, 2023 17:55
TCP Socket activation process/docker by Deno

Install

Copy the script into somewhere (or PATH) and chmod +x them.

Deno is required.

Socket activating process

./socket_activation.ts -l 0.0.0.0:1234 -p 127.0.0.1:1235 --idle-timeout 300 ./my_service
deno run --allow-net --unstable portforward.ts 443 github.com 443

# Or, install it as CLI and run
cp portforward.ts /usr/bin/portforward
portforward 443 github.com 443

Arguments:

@lideming
lideming / lark_msg
Last active November 11, 2022 01:47
Send lark/feishu bot message from shell
#!/bin/sh
WEBHOOK=YOUR_WEBHOOK_HERE
if [ "$*" == "--help" ] ; then
echo "Usage: lark_msg <msg>..."
exit 0
fi
msg="$*"
// ==UserScript==
// @name LyricsCopy
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Copy lyrics from lyrics website
// @author Li Deming
// @match https://utaten.com/lyric/*
// @match https://zh.moegirl.org.cn/*
// @grant none
// ==/UserScript==