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
#!/bin/sh
hostip=$(cat /etc/resolv.conf | grep nameserver | awk '{ print $2 }')
wslip=$(hostname -I | awk '{print $1}')
port=<PORT>
PROXY_HTTP="http://${hostip}:${port}"
set_proxy(){
export http_proxy="${PROXY_HTTP}"
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
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#