TOC
This file contains hidden or 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 hidden or 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 hidden or 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