Skip to content

Instantly share code, notes, and snippets.

@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]
}
@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 / 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 / geo+rule-provider.md
Last active October 11, 2024 03:49
clash geodata 和 rule-provider 笔记

本人的历史对话 整理到此

geo 文件