Skip to content

Instantly share code, notes, and snippets.

@canbingzt
canbingzt / 1.ps1
Created January 13, 2024 02:20
Windows Defender 阻止访问受保护的文件夹/内存(保护历史记录) 清理
Set-MpPreference -ScanPurgeItemsAfterDelay 2
# 其中的数字是在发现威胁后的多少天里清除
proxies:
- name: v2ray
server: example.com
port: 443
type: vmess
uuid: uuid
alterId: 100
cipher: auto
tls: true
skip-cert-verify: true
@canbingzt
canbingzt / app.sh
Created August 6, 2021 01:09
app.sh
#!/bin/bash
## blog:www.cnbuilder.cn
## create 2019-04-30
version="5.2.1";
appName=$2
if [ -z $appName ];then
appName=`ls -t |grep .jar$ |head -n1`
fi
@canbingzt
canbingzt / proxy.sh
Last active October 14, 2024 09:25
#!/bin/sh
#hostip=$(cat /etc/resolv.conf | grep nameserver | awk '{ print $2 }')
hostip=$(ip route list default | awk '{print $3}')
wslip=$(hostname -I | awk '{print $1}')
port=<PORT>
PROXY_HTTP="http://${hostip}:${port}"
set_proxy(){
export http_proxy="${PROXY_HTTP}"
@canbingzt
canbingzt / wsl2.ps1
Last active July 21, 2023 07:19
WSL2中允许访问宿主机网络
Remove-NetFirewallRule -DisplayName "WSL"
New-NetFirewallRule -DisplayName "WSL" -Direction Inbound -InterfaceAlias "vEthernet (WSL)" -Action Allow