Notes/cmd.txt

170 lines
5.9 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[直接下载 ]
Invoke-WebRequest -Uri "" -OutFile "%USERPROFILE%/Downloads/.zip"
[U盘更新]
更新驱动 C:\WINDOWS\SYSTEM32\DRIVERSTORE\ 在三个地方
未知设备 in 其他设备
USB SanDisk 3.2Gen1 USB DeviceUSB in 大容量存储设备
磁盘驱动器 in 通用串行总线
https://blog.csdn.net/qq_38220334/article/details/104626110
[bat]
[提权]
net session >nul 2>&1 || (powershell start-process '%~f0' -verb runas & exit /b)
whoami /groups | find "TrustedInstaller" >nul || (NSudoLC -U:T -P:E cmd /c "%~f0" & exit /b)
[服务器info]
[染色]
reg add HKCU\Console /v VirtualTerminalLevel /t REG_DWORD /d 1 /f
[密钥自动登录]
ssh-keygen -t ed25519 -N "" -C "" -f %USERPROFILE%\.ssh\id_ed25519 -q
for %T in ("stu@192.168.50.111:cqbz1938") do @for /f "tokens=1,2 delims=:" %a in (%T) do @type %USERPROFILE%\.ssh\id_ed25519.pub|plink -ssh %a -pw %b "mkdir -p .ssh;cat>>.ssh/authorized_keys;chmod 600 .ssh/authorized_keys"
for /L %i in (1,1,255) do @type %USERPROFILE%\.ssh\id_ed25519.pub|plink -ssh stu@192.168.50.%i -pw cqbz1938 -batch "mkdir -p .ssh;cat>>.ssh/authorized_keys;chmod 600 .ssh/authorized_keys"
[Clash]
[启动]
for %T in ("stu@192.168.50.111:cqbz1938" ) do @for /f "tokens=1,2 delims=:" %a in (%T) do @(pscp -pw %b -q XFLTDServer.yml %a:/tmp/vscode-ah-2f1c79rga7fa & plink -ssh %a -pw %b -batch "pkill -f mihomo" & start "mh-%a" ssh -t %a "trap 'rm -f /tmp/vscode-ah-2f1c79rga7fa' EXIT && ~/.ssh/mihomo -d ~/.ssh -f /tmp/vscode-ah-2f1c79rga7fa")
pkill -f mihomo
[windows]
ssh -L 1080:127.0.0.1:1080 -N stu@192.168.50.111
ssh -L 1081:127.0.0.1:1081 -N stu@192.168.50.111
[看看API]
https://metacubex.github.io/metacubexd/#/setup?http=true&hostname=127.0.0.1&port=9090&secret=
https://yacd.metacubex.one/#/proxies
https://board.zash.run.place/#/setup?http=true&hostname=127.0.0.1&port=9090&secret=
[看看有没有开代理]
gsettings get org.gnome.system.proxy mode
[ssh]
ssh stu@192.168.50.118
ssh -D 1080 -N stu@192.168.50.118
ssh -L 1080:127.0.0.1:1080 -N stu@192.168.50.111
[服务器官网]
https://console.ucloud.cn/light-server/
[域名官网]
https://dnsnext.console.aliyun.com/authoritative/domains/vec2.space
[DNS] 点第二个的管理
https://home.console.aliyun.com/home/dashboard/ProductAndService
[xray的配置]
/usr/local/etc/xray/config.json
[建库]
wget -O gitea https://dl.gitea.com/gitea/1.21.11/gitea-1.21.11-linux-amd64
chmod +x gitea
./gitea web
[证书]
放在/home/rwtwy/webs/cert/*里
我习惯的名称是 域名.key 和 是 域名.crt 的名称方式
[gitea]
[启]
./gitea
[配置]
/home/rwtwy/custom/conf/app.ini
[git]
[大信任]
git config --global --add safe.directory "*"
[nginx和xray的指令们]
[nginx的配置]
/etc/nginx/nginx.conf
[重启]
sudo nginx -s reload
sudo systemctl restart xray
[配置文件]
sudo nginx -t
[下载nginx]
[win] curl -o n.zip https://nginx.org/download/nginx-1.26.2.zip&tar -xf n.zip&ren nginx-1.26.2 nginx&del n.zip&cd nginx&start nginx
[活着吗]
[win] tasklist|findstr /i nginx
[死啊]
[win] taskkill /f /im nginx.exe
[tailscale]
tailscale status --json | findstr "DNSName"
tailscale funnel status
tailscale serve --bg 80
[注册更新证书]
[note] 要 $1dns解析到我的服务器 & root & 关闭nginx
~/.acme.sh/acme.sh --register-account -m vec2vec2vec2vec2@outlook.com
~/.acme.sh/acme.sh --set-default-ca --server letsencrypt
~/.acme.sh/acme.sh --issue -d "$1" --ecc --standalone --force
~/.acme.sh/acme.sh --renew -d "$1" --ecc --standalone --force
~/.acme.sh/acme.sh --install-cert -d "$1" --ecc \
--key-file /home/rwtwy/webs/cert/"$1".key \
--fullchain-file /home/rwtwy/webs/cert/"$1".crt
[假证书]
openssl req -x509 -newkey rsa:2048 -keyout /home/rwtwy/webs/cert/www.baidu.com.key -out /home/rwtwy/webs/cert/www.baidu.com.crt -days 3650 -nodes -subj "/CN=www.baidu.com"
[hosts和刷新]
C:\Windows\System32\drivers\etc\hosts
ipconfig /flushdns
[安装ssh]
Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0
[一键装g++ gcc]
[linux] apt update && apt install -y build-essential cmake git
[装cmake gui vcpkg]
[win]
winget install Kitware.CMake
git clone https://github.com/microsoft/vcpkg.git C:\vcpkg
C:\vcpkg\bootstrap-vcpkg.bat
cmake-gui -DCMAKE_TOOLCHAIN_FILE="C:/vcpkg/scripts/buildsystems/vcpkg.cmake"
C:\vcpkg\vcpkg.exe 添加到path
或者
vcpkg integrate install
在C:\Program Files\CMake\bin
在C:/vcpkg/scripts/buildsystems/vcpkg.cmake
[激活win]
irm https://get.activated.win | iex
[ 密码明]
NVIDIA vec2vec2vec2vec2@outlook.com qwer3r#Rq
[下载静态网页] // https://blog.csdn.net/weixin_44786530/article/details/150956120
wget -p -k -E https://example.com/page
wget -p -k -E -i RUL.txt
参数解释:
-p page-requisites下载显示该页面所需的所有资源CSS、JS、图片
-k convert-links把网页里的链接改成本地相对路径这样离线打开不会跳外网。
-E adjust-extension自动给文件加 .html 后缀,保证浏览器能识别
[cmake]
1.勾选Specify toolchain file for cross-compiling
2.Specify the Toolchain file里填入
C:/E/Tools/vcpkg/scripts/buildsystems/vcpkg.cmake
-DCMAKE_TOOLCHAIN_FILE=C:/E/Tools/vcpkg/scripts/buildsystems/vcpkg.cmake
-DCMAKE_PREFIX_PATH="C:/Program Files/Microsoft Visual Studio/2022/Preview/SDK/ScopeCppSDK/vc15/SDK/lib"
[下载之前版本]
git clone https://unionlanguage-admin@bitbucket.org/unionlanguage/include.git
cd include
git checkout 9c8da36
[git clone cmake project]
git clone https://github.com/KhronosGroup/SPIRV-Reflect.git
cd SPIRV-Reflect
cmake -B build -S . -DCMAKE_INSTALL_PREFIX=D:/ThirdParty/SPIRV-Reflect
cmake --build build --target install
cmake -G "Visual Studio 17 2022" -A x64 -DCMAKE_INSTALL_PREFIX="D:/ThirdParty/SPIRV-Reflect"
cmake --build . --config Release --target install
[工作台]
git clone https://github.com/SaschaWillems/Vulkan_Test.git
cd Vulkan_Test
cmake -B build -S .
cmake --build build --target install
cmake --build . --config Release --target install
D:\ThirdParty\SPIRV-Reflect