本机外网ip windows/linux通用
1 2 3 4 5 6 curl ip.sb # 只显示ipv4   curl cip.cc #显示ipv4和地址信息 # 指定ip信息 curl ifconfig.me/ip  --resolve 'ifconfig.me:80:34.117.118.44' 
 
进程参数 1 2 3 4 tasklist|findstr 21692 wmic process get caption,commandline /value |findStr mstsc wmic process where caption="cmd.exe" get caption,commandline /value wmic process where caption="xshell.exe" get caption,commandline /value 
 
开关wifi netsh interface set interface “WLAN” enabled netsh interface set interface “WLAN” disabled
开关热点 HotspotOnOff.ps1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 [Windows.System.UserProfile.LockScreen ,Windows.System.UserProfile ,ContentType =WindowsRuntime ] | Out-Null  Add-Type  -AssemblyName  System.Runtime.WindowsRuntime$asTaskGeneric  = ([System.WindowsRuntimeSystemExtensions ].GetMethods() | ? { $_ .Name -eq  'AsTask'  -and  $_ .GetParameters().Count -eq  1  -and  $_ .GetParameters()[0 ].ParameterType.Name -eq  'IAsyncOperation`1'  })[0 ]Function  Await ($WinRtTask , $ResultType )   {    $asTask  = $asTaskGeneric .MakeGenericMethod($ResultType )     $netTask  = $asTask .Invoke($null , @ ($WinRtTask ))     $netTask .Wait(-1 ) | Out-Null      $netTask .Result } $connectionProfile  = [Windows.Networking.Connectivity.NetworkInformation ,Windows.Networking.Connectivity ,ContentType =WindowsRuntime ]::GetInternetConnectionProfile()$tetheringManager  = [Windows.Networking.NetworkOperators.NetworkOperatorTetheringManager ,Windows.Networking.NetworkOperators ,ContentType =WindowsRuntime ]::CreateFromConnectionProfile($connectionProfile )$tetheringManager .TetheringOperationalStateif  ($tetheringManager .TetheringOperationalState -eq  1 ){         Await ($tetheringManager .StopTetheringAsync()) ([Windows.Networking.NetworkOperators.NetworkOperatorTetheringOperationResult ]) } else {         $accessPoint  = $tetheringManager .GetCurrentAccessPointConfiguration()          $accessPoint .Ssid = "what"           $accessPoint .Passphrase = "A19802021823."      $tetheringManager .ConfigureAccessPointAsync($accessPoint )          Await ($tetheringManager .StartTetheringAsync()) ([Windows.Networking.NetworkOperators.NetworkOperatorTetheringOperationResult ]) } 
 
任务计划程序:powershell -ExecutionPolicy Unrestricted -f D:\HotspotOnOff.ps1
ip-网卡路由绑定 
获得网关ip ipconfig  
获得接口序号 route print 
配置路由  route ADD 157.0.0.0 MASK 255.0.0.0  157.55.80.1 METRIC 3 IF 2        destination^                   ^mask      ^gateway     metric^    ^ Interface 
 
把METRIC值设置的足够小,就能优先使用此条路由路径; 要想永久生效,请使用可选参数-p
Mysql https://downloads.mysql.com/archives/community/ 
https://www.cnblogs.com/haovco/p/11258387.html  .\mysqld –initialize –console
.\mysqld install net start mysql
mysql -h 主机名 -u 用户名 -p mysql -u root -p
select id,process_definition_id,state,recovery,start_time,end_time,run_times,max_try_times,schedule_time from t_ds_process_instance  INTO OUTFILE ‘/tmp/R_developers_cmd.csv’ FIELDS ENCLOSED BY ‘“‘ TERMINATED BY ‘|’ ESCAPED BY ‘“‘ LINES TERMINATED BY ‘\n’;
https://store.rg-adguard.net/ https://www.microsoft.com/store/productId/9WZDNCRFJ3PS  .appxbundle 
SwitchHosts https://github.com/oldj/SwitchHosts/releases 
在线hosthttps://raw.hellogithub.com/hosts https://github.com/ineo6/hosts/raw/master/next-hosts 
https://github.com/dotnetcore/FastGithub 
Github CDN加速 git config –global url.”https://ghproxy.com/https://github.com".insteadOf  “https://github.com “ git config –global –unset url.https://ghproxy.com/https://github.com.insteadOf  git config  -l
快捷启动工具 
fluentSearch 
listary 
mouseInc 
quicker 
AHK 
 
热键工具 AutoHotKey
1 2 3 4 5 6 符号  描述 #   Win(Windows 徽标键) !   Alt ^   Ctrl +   Shift &   用于连接两个按键(含鼠标按键) 合并成一个自定义热键. 
 
示例
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 ^j:: {     Send "My First Script" } 热字串 - 替换/Opr ::ftw::Free the whales :*:btw::by the way  ; 不需要按下结束符. ::btw:: {     MsgBox "You typed btw." } ::pop:: SendInput 19802021823{Enter} return ::=-=:: SendInput {Del}{Del}{Del}{Del}proxy{Enter} return 
 
开机启动 我的电脑-计算机-管理-任务计划程序
可设置 系统启动时及延迟执行 来运行脚本
获取动态参数启动xshell 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 import  sys,osprint ('参数个数为:' , len (sys.argv), '个参数。' )print ( '参数列表:' , str (sys.argv))print (sys.argv[7 ])print (sys.argv[9 ])print (sys.argv[11 ])print (sys.argv[13 ])server=sys.argv[7 ] port=sys.argv[9 ] username=sys.argv[11 ] password=sys.argv[13 ] os.system(r'"C:\Program Files (x86)\NetSarang\Xmanager Enterprise 5\Xshell.exe"'  + ' -url SSH://'  + username + ':'  +  password + '@'  + server + ':'  + port + ' -newtab '  + server) 
 
Windows系统中添加自定义永久路由(通过route命令) 1 2 3 4 5 6 7 if后面接本机的网卡接口号。 -p参数表示该条路由永久生效 route PRINT 10.17.14.0 route delete 10.17.14.0 route add 10.17.14.0 mask 255.255.255.0 10.2.0.95 if 22 metric 2 -p 
 
Soft 
大文件清理  WinDirStat 
编辑器 Notepad3 
notepad++【设置】——【语言格式设置】,将前景色设置成黑色,背景色(色调:80 饱和度:97 亮度:205),设置使用到全局 
XShell/MobaXTerm/WindTerm 
AutoHotKey 
 
限制应用联网 测试未成功
1 2 3 4 5 6 7 8 9 10 11 12 13 # Create outbound rule to block internet access but allow local network New-NetFirewallRule -DisplayName "Block Internet for  MyApp" `     -Direction Outbound `     -Program "D:\soft\MobaXterm\MobaXterm_Personal.exe" `     -Action Block `     -RemoteAddress Internet New-NetFirewallRule -DisplayName "Allow Local Network for  MyApp" `     -Direction Outbound `     -Program "D:\soft\MobaXterm\MobaXterm_Personal.exe" `     -Action Allow `     -RemoteAddress LocalSubnet 
 
visio替代 inkscape √ libreoffice draw
chrome用户资料备份 1 2 3 4 5 chrome://version/ 获得路径C:\Users\jiangmanhua.LGGHLW4A\AppData\Local\Google\Chrome\User Data\  cd /drives/c/Users/jiangmanhua.LGGHLW4A/AppData/Local/Google/  tar -czf chrome-20250613.tgz Chrome  mv chrome-20250613.tgz  /drives/c/Users/jiangmanhua.LGGHLW4A/ 
 
还原:
右键 Chrome 快捷方式 → 属性 ,在 目标  后面追加用户上一级目录
1 2 3 4 5 6 chrome_path = r'C:\Program Files\Google\Chrome\Application\chrome.exe' --user-data-dir="C:\Users\TEMP.LGGHLW4A.003\Downloads\chrome" --enable-features=PasswordImport /drives/c/Users/jiangmanhua.LGGHLW4A/AppData/Local/Google/Chrome/Application/chrome.exe  --user-data-dir="C:\Users\jiangmanhua.LGGHLW4A\Downloads\Chrome\User Data" --enable-features=PasswordImport  
 
chrome://flags  搜 password import
1 2 3 4 4a-moba-script-odisk  tar -xf /drives/o/chrome-20250613.tgz  Chrome/Application/chrome.exe  --user-data-dir="Chrome\User Data" --enable-features=PasswordImport  换机器后密码不可用,需导入 
 
键鼠共享barrier 配置过程
SSL 生成(客户端,服务端) 
服务端配置客户端的屏幕信息。 
客户端配置服务端 IP信息 
 
1 2 3 4 5 6 7 8 9 10 11 12 13 14 windows: git-bash openssl req -x509 -nodes -days 365 -subj //CN=Barrier -newkey rsa:4096 -keyout Barrier.pem -out Barrier.pem cp Barrier.pem /c/Users/Manhua/AppData/Local/Barrier/SSL/ linux: openssl req -x509 -nodes -days 365 -subj /CN=Barrier -newkey rsa:4096 -keyout Barrier.pem -out Barrier.pem vi /home/admin/.local/share/barrier/SSL/Fingerprints/TrustedServers.txt v1:sha1:0A:52:25:FC:98:2E:20:29:5B:F2:AC:6F:A3:D0:95:BC:8A:2F:C5:97 v2:sha256:A0:38:61:97:E8:D9:FB:FC:97:9D:A6:81:22:1A:AF:B1:73:48:E1:45:B5:DE:A0:80:4D:07:A8:86:48:7F:E8:76 
 
哈希值 1 2 certutil -hashfile .\path2sql.sh SHA256 certutil -hashfile .\path2sql.sh MD5