Skip to content

Instantly share code, notes, and snippets.

View janlay's full-sized avatar

Janlay Wu janlay

View GitHub Profile
@janlay
janlay / README.md
Last active April 16, 2023 16:27
OpenAPI Proxy for Cloudflare Workers
@janlay
janlay / README.md
Last active October 23, 2023 04:29
Surge Modules

Here are some Surge modules created by me.

Tesla China

This module makes Tesla app access its services targeted in China mainland. Install it with this link.

DNS Daily Sweeper

Automatically flushes DNS records everyday. Install it with this link.

@janlay
janlay / README.md
Last active October 8, 2022 03:22
jq Module for OpenSubtitles

This module picks the best subtitle from OpenSubtitles' search result. Created by @janlay

Input:

OpenSubtitles's search result

Arguments:

  • language: Required. Format should be recognized by OpenSubtitles like "en", "zh", "zh-CN"
  • group: Optional. Movie's release group name
@janlay
janlay / README.md
Last active September 26, 2022 15:59
Clash tun and Telegram

Clash tun and Telegram

This gist provides key guideline to make Clash tun handle Telegram's pure IP traffic.

You may want to change the corresponding items in the script

  • The IP list file telegram.list is located in /etc/asn/
  • 7892 is redir-port in Clash's config file
  • iptables module iptables-mod-extra is required for the --match-set usage

Usage

  1. Prepare your Clash service with:
@janlay
janlay / README.md
Last active June 24, 2024 01:57
魂签 (Soulsign) 脚本

About

魂签,一款用于自动签到的Chrome插件

这里存放由我创建或改进的魂签 (Soulsign) 脚本

Usage

  1. 从这里复制你想要的脚本 Raw URL
  2. 打开魂签「任务管理」
  3. 点击「添加脚本」按钮
  4. 粘贴 URL 并点击「保存」按钮

Keybase proof

I hereby claim:

  • I am janlay on github.
  • I am janlay (https://keybase.io/janlay) on keybase.
  • I have a public key ASAdsgFM0gJM4sbu3Jm2dr4rysHJIdVt4leRb1UI_JGX3wo

To claim this, I am signing this object:

@janlay
janlay / backup-bitwarden.sh
Last active April 7, 2021 08:52
Backup Bitwarden Data
#!/bin/bash
set -e
# Backup db and certs in $BITWARDEN_DIR into $TARGET_DIR/$FILENAME_PREFIX$DATE.tar.gz
BITWARDEN_DIR='/volume1/docker/Bitwarden'
TARGET_DIR='/var/services/dropbox/Backup/Bitwarden'
FILENAME_PREFIX='bw-backup_'
FILENAME_DATE_PATTERN='%m-%d'
@janlay
janlay / edge-ramdisk.reg
Created June 11, 2020 07:10
Open Microsoft Edge with RAMDisk's caching directory
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\MSEdgePDF\shell\open\command]
@="\"C:\\Program Files\\Microsoft\\Edge\\Application\\msedge.exe\" --disk-cache-dir=R:\\MSEdge -- \"%1\""
[HKEY_CLASSES_ROOT\MSEdgeHTM\shell\open\command]
@="\"C:\\Program Files\\Microsoft\\Edge\\Application\\msedge.exe\" --disk-cache-dir=R:\\MSEdge -- \"%1\""
[HKEY_CLASSES_ROOT\http\shell\open\command]
@="\"C:\\Program Files\\Microsoft\\Edge\\Application\\msedge.exe\" --disk-cache-dir=R:\\MSEdge -- \"%1\""
@janlay
janlay / README.md
Last active November 7, 2024 10:12
Rule sets for Surge & Clash

Janlay's public ruleset

Enjoy all the common rulesets brought by janlay.

A quick guideline

In the rules section of Surge/Clash config, use the shared rulesets in this order:

  1. blocked-domains
  2. quick-direct
  3. loc-sens
  4. traffic
  5. \
@janlay
janlay / tput-table
Created April 9, 2020 04:06
Full preview for tput foreground and background
#!/bin/bash
# author: janlay@gmail.com
set -e
cols=$(bc <<< "$(tput cols) / 3 - 2")
char=✾
echo -n ' '
for col in $(seq 0 $cols); do