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 June 27, 2022 15:27
Delete and unfavorite tweets

Delete and unfavorite tweets

This util deletes your historical tweets from a downloaded archive file, unfavorites tweets from your public profile.

No guarantee, no support, use it at your own risk.

Preparations

  1. Apply to become a Twitter developer first.
    Once your Twitter developer account application is approved, You can create a new app and get its Consumer API keys and generate Access token. These keys are used to configure tweet.sh.
  2. Obtain archived tweets by requesting to download your Twitter data.
    You can extract tweet.js file from the downloaded .zip file.
@janlay
janlay / tput-table
Created April 9, 2020 04:06
Full preview for tput foreground and background
#!/bin/bash
# author: [email protected]
set -e
cols=$(bc <<< "$(tput cols) / 3 - 2")
char=✾
echo -n ' '
for col in $(seq 0 $cols); do
@janlay
janlay / README.md
Last active April 4, 2025 13:44
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 / 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 / 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'

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 / README.md
Last active January 1, 2025 02:33
魂签 (Soulsign) 脚本

About

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

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

Usage

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