Skip to content

Instantly share code, notes, and snippets.

View suchasplus's full-sized avatar

suchasplus suchasplus

  • xmly.work
  • Beijing
View GitHub Profile
@suchasplus
suchasplus / json
Created June 30, 2026 12:38
disabled-app-list
[
"org.telegram.messenger",
"com.llamalab.automate",
"jp.co.cyberagent.stf",
"com.vivo.demoitos",
"com.oppo.cloudtest.androidagent",
"cts.gmssetuptool",
"com.tencent.ctrlapp",
"com.vivo.atphonemanager",
"com.emanuelef.remote_capture",
@suchasplus
suchasplus / claude-sessions.md
Last active May 18, 2026 13:37
List Claude Code sessions named via /rename or --name/-n (UTC+8 output)

claude-sessions

List Claude Code sessions you've named — via the /rename slash command or the --name / -n startup flag.

Reads ~/.claude/projects/*/*.jsonl directly. Output times are in UTC+8 (Asia/Shanghai). No external dependencies — Python stdlib only.

Install

Drop the script into a directory on your PATH:

@suchasplus
suchasplus / discourse.ts
Last active July 14, 2026 15:00
discourse 刷阅读量 from opus4.6
(async () => {
// ============ CONFIG ============
const FLUSH_INTERVAL = 30000; // 30s flush 一次,远低于频控线
const SCROLL_STEP = 300;
const SCROLL_INTERVAL = 1200;
const IDLE_WAIT = 4000;
const MAX_IDLE_RETRIES = 5;
const sleep = ms => new Promise(r => setTimeout(r, ms));
// ============ 共享缓冲区 ============
@suchasplus
suchasplus / path_clean.sh
Created December 24, 2025 10:50
PATH 去重函数 - bash 4+ / zsh 兼容
# PATH 去重函数 - bash 4+ / zsh 兼容
# 添加到 ~/.bashrc 或 ~/.zshrc
# eg:
# cpp > /dev/null
# 去重 PATH,保留首次出现的条目
dedup_path() {
local -A seen
local new_path=""
local dir
@suchasplus
suchasplus / set_rps.sh
Created November 3, 2022 11:15
Receive Packet Steering Set
#!/bin/bash
# Enable RPS (Receive Packet Steering)
cc=$(grep -c processor /proc/cpuinfo)
end=$(((cc-32)/4))
#rpcc=$(head -c $end < /dev/zero | tr '\0' 'f')
#rpcc=$(printf "f%.0s" $(seq $end))
rsfe=32768
count=0
j1=0
j2=0
@suchasplus
suchasplus / MacOS-install-ffmpeg.bash
Created January 21, 2022 06:40
macos install ffmpeg and video convert example
brew tap homebrew-ffmpeg/ffmpeg
brew install homebrew-ffmpeg/ffmpeg/ffmpeg
brew options homebrew-ffmpeg/ffmpeg/ffmpeg
brew install homebrew-ffmpeg/ffmpeg/ffmpeg --with-<option1> --with-<option2> ...
#video eg: https://4ksamples.com/puppies-bath-in-4k/
#20s抽一帧
ffmpeg -i PUPPIES_BATH_IN_4K_Original_H.264_AAC.mp4 -f image2 -vf fps=fps=1/20 puppies_%d.png
@suchasplus
suchasplus / git-team-init-config.sh
Created September 22, 2020 06:01
git team config
#团队协作Git配置推荐 https://sq.163yun.com/blog/article/197477848982818816
git config --global core.eol lf
git config --global core.autocrlf input
git config --global core.safecrlf false
git config --global core.whitespace trailing-space,space-before-tab,-cr-at-eol
git config --global merge.ff only
git config --global tag.sort version:refname
git config --global log.date iso
#使用Tab缩进, 并在修复时将4空格替换为Tab
@suchasplus
suchasplus / semantic-commit-messages.md
Created September 22, 2020 05:52 — forked from joshbuchea/semantic-commit-messages.md
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@suchasplus
suchasplus / openssh reuse.txt
Last active September 22, 2020 05:55
reuse openssh connection
$ cat .ssh/config
Host *
VisualHostKey yes
Compression yes
ServerAliveInterval 60
#PasswordAuthentication no
ControlMaster auto
ControlPersist 4800
ControlPath ~/.ssh/control/%r.%h.%p.sock
@suchasplus
suchasplus / bilibili-combine.sh
Created July 17, 2017 12:28
combine bilibili flvs to one file
cat /dev/null > ff.txt
for i in *.blv; do
seq_num="${i%.blv}" # 分段序列号
if [ "${#seq_num}" -eq 1 ]; then
# 给文件名添 0
mv "$i" "0$seq_num.flv"
else