TOC
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" 设置相关: 查看设置的值: `: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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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' # 文件的年份是当前年 时间格式 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 后端 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 \ |
将 本人的历史对话 整理到此
- geosite.db: clash 源码里未发现读取的地方, 猜测 clash 不支持此格式
- geosite.dat: 源码 path.GeoSite, 存放域名的地方, 这些域名会按照一定规则分组称为 域名类别, 比如
domain:ip.cn
属于cn
;domain:git.io domain:githubusercontent.com
属于github
. 这个文件可以通过 metacubex/geo 解压查看. - country.mmdb: 格式是 maxmind 定义的 IP geolocation databases,用途是根据 ip 地址查询国家/城市/时区等信息,而名称的 country 是指只包含到国家的信息,而没有城市/时区,具体可容纳的信息见它的 pdf 说明 GeoLite2-IP-MetaData-Databases-Comparison-Chart. 而这个仓库的此文件来自 Loyalsoldier/geoip, 其在 maxmind 提供的标准基础上新增了域名类别(cloudflare/google...) 等等, 具体见其说明 [与官方版 GeoIP 的区别](https://github.com/Loyalsoldier/geoip?tab=readme-ov-file#%E4%B8%8E%E5%AE%98%E6%96%B9%E7%89%88-geoip-%E7%9A%84%E5%8