chocolatey
发表于
install
1 | Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1')) |
packages
1 | choco install chocolateygui -y |
debian
发表于
dd
1 | wget --no-check-certificate -qO InstallNET.sh 'https://raw.githubusercontent.com/leitbogioro/Tools/master/Linux_reinstall/InstallNET.sh' && chmod a+x InstallNET.sh |
1 | curl -O https://raw.githubusercontent.com/bin456789/reinstall/main/reinstall.sh || wget -O reinstall.sh $_ |
ovz/lxc
1 | wget -qO OsMutation.sh https://raw.githubusercontent.com/LloydAsp/OsMutation/main/OsMutation.sh && chmod u+x OsMutation.sh && ./OsMutation.sh |
1panel
1 | curl -sSL https://resource.fit2cloud.com/1panel/package/quick_start.sh -o quick_start.sh && bash quick_start.sh |
mount
1 | ls /dev/disk/by-id/ |
1 | lsblk |
github
1 | sed -i "/# GitHub520 Host Start/Q" /etc/hosts && curl https://raw.hellogithub.com/hosts >> /etc/hosts |
禁用 IPV6
1 | echo "net.ipv6.conf.all.disable_ipv6=1" >> /etc/sysctl.conf && sysctl -p |
nat64
1 | echo -e "nameserver 2a00:1098:2b::1\nnameserver 2a00:1098:2c::1\nnameserver 2a01:4f8:c2c:123f::1" > /etc/resolv.conf |
iptables
1 | apt install iptables -y |
ssh
1 | sed -i 's/#\?PermitRootLogin.*/PermitRootLogin yes/' /etc/ssh/sshd_config && systemctl restart sshd |
1 | ssh-keygen -t rsa |
/etc/ssh/sshd_config
1 | PubkeyAuthentication yes |
1 | systemctl restart sshd |
dev
发表于
nvm
1 | nvm node_mirror https://npmmirror.com/mirrors/node/ |
npm
1 | npm config get registry |
yarn
1 | yarn config get registry |
pnpm
1 | pnpm config get registry |
git
1 | git config credential.helper store |
时间段重叠
1 | a_start <= b_end and a_end >= b_start |
关闭端口
1 | for /f "tokens=5" %a in ('netstat -ano ^| findstr :8080 ^| findstr LISTENING') do taskkill /pid %a /f |
docker
发表于
echarts
发表于
c#
1 | static double GetPercentValue(int[] arr, int idx, int precision) |
js
1 | function getPercentValue(arrList, index, precision) { |
js
发表于
货币
1 | 123456.789.toLocaleString('zh', { style: 'currency', currency: 'CNY' }) |
百分比
1 | 0.75.toLocaleString('zh', { style: 'percent' }) |
相对时间
1 | Vue.filter('relativeTime', (date) => { |
mssql
发表于
1 | -- 创建角色 |
pve
发表于
pve_source
1 | wget -q -O /root/pve_source.tar.gz 'https://bbs.x86pi.cn/file/topic/2024-01-06/file/24f723efc6ab4913b1f99c97a1d1a472b2.gz' && tar zxvf /root/pve_source.tar.gz && /root/./pve_source |
创建 ipv4 虚拟机
1 | curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/buildvm_extra_ip.sh -o buildvm_extra_ip.sh && chmod +x buildvm_extra_ip.sh |
创建 nat 虚拟机
1 | curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/buildvm.sh -o buildvm.sh && chmod +x buildvm.sh |
创建 windows 虚拟机
1 | chmod +x buildvm_windows_server_2022.sh |
删除虚拟机
1 | curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/pve_delete.sh -o pve_delete.sh && chmod +x pve_delete.sh |
硬盘直通
1 | ls /dev/disk/by-id/ |
qemu-guest-agent
1 | apt install qemu-guest-agent -y |