Skip to content

Instantly share code, notes, and snippets.

@potoo0
potoo0 / geo+rule-provider.md
Last active October 11, 2024 03:49
clash geodata 和 rule-provider 笔记

本人的历史对话 整理到此

geo 文件

@potoo0
potoo0 / pve-patch-v01.sh
Last active October 6, 2024 15:02
pve-patch-v01.sh
# 后端 pveproxy
## 去除订阅弹窗
dst1=/usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js
grep -q '/\*patched-v01\*/' $dst1 \
|| sed -i.bak '/function(orig_cmd) {/a\/*patched-v01*/orig_cmd(); return;' $dst1 \
&& echo "$dst1 patched"
## 增加温度显示, 还需要改前端, 见下面 <前端温度显示>
dst2=/usr/share/perl5/PVE/API2/Nodes.pm
grep -q '###patched-v01###' $dst2 \
@potoo0
potoo0 / lfrc
Created April 30, 2024 10:46
lf cheatsheet
# https://github.com/gokcehan/lf/blob/master/etc/lfrc.example
set autoquit true # 没有客户端时自动关闭 server
# interpreter for shell commands
set shell bash
# shell options, -e 遇到错误立即退出; -u 未定义的环境变量将报错退出
set shellopts '-eu'
set infotimefmtnew '01-02 15:04' # 文件的年份是当前年 时间格式
@potoo0
potoo0 / tmux.conf
Last active June 28, 2024 06:16
simple tmux conf
############################# tmux config #############################
# : << EOF do not edit! 含义: 将 E-O-F 之间的重定向到 `:`, 也就是丢弃
# `tmux -V` > tmux3.2a+
# tmux 3.4 以上支持 run-shell 增加可选项 -c 来指定工作目录(issue 3661), eg: -c '#{pane_current_path}'
# config path: /etc/tmux.conf, ~/.config/tmux/tmux.conf, ~/.tmux.conf
# set(set-option): 如果选项不是用户选项,则 -w 或 -s 可省略,tmux 会根据设置名称自动推断.
# setw: set -w 的简写
# bind(bind-key): 默认绑定到 prefix 表格中(相当于指定参数 -Tprefix), -N 用来写备注
# 命令语法: https://man7.org/linux/man-pages/man1/tmux.1.html#PARSING_SYNTAX
@potoo0
potoo0 / profile-win.yaml
Created April 17, 2024 04:17
clash-profile
# Merge Template for clash verge
# The `Merge` format used to enhance profile
# Profile Template for clash verge
# https://wiki.metacubex.one/config/general/
# https://wiki.metacubex.one/en/example/conf/?h=fake+ip#__tabbed_1_4
proxy-providers:
tuboshu:
type: http
url: https://proxy-provider-converter-three-tan.vercel.app/api/convert?url=https%3A%2F%2Ffe
@potoo0
potoo0 / vimrc
Created April 10, 2024 04:33
vim simple config
" 设置相关: 查看设置的值: `:set opt?`, 示例: `:set mouse?`;
" 使用 `vim --version` 可查看配置文件路径, `:scriptname` 可查看加载的脚本
set nocompatible
" indentation option
set expandtab
set tabstop=4 " width
set shiftwidth=4 " same to tabstop
set softtabstop=-1 " use value of shiftwidth
set smarttab " always use shiftwidth
@potoo0
potoo0 / prompt.ps1
Created June 24, 2022 05:32 — forked from thomastay/prompt.ps1
Powershell fish prompt
function replaceHome($pathArray) {
# Check whether the first three paths are equal to HOME
# If it is, it substitutes it for ~
# Change this accordingly, if your home path is more than three
# paths long.
$splitChar = [System.IO.Path]::DirectorySeparatorChar
if ( ($pathArray.Length -gt 2) -and
(($pathArray[0..2] -join $splitChar) -eq $HOME)) {
@("~") + $pathArray[3..$pathArray.Length]
}