本机外网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
快捷启动工具
热键工具 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命令) 查询当前路由 route print
例子 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 例如,我们想添加一条路由,目标网段是192.168.5.0/24(掩码是255.255.255.0),下一跳是192.168.2.254,并且这条路由应用在“24”网卡接口上,那么我们就可以输入这样一条命令: route add 192.168.5.0 mask 255.255.255.0 192.168.2.254 if 24 -p 在这个例子中: 192.168.5.0表示目标网段; mask后面接掩码,255.255.255.0表示目标网段的掩码; 192.168.2.254表示路由的下一跳地址,也就是,想要到达192.168.5.0的数据,本机都会发给192.168.2.254去转发; if后面接本机的网卡接口号,如果本机有多个网卡,那么就需要区分你想要用哪个网卡去访问目标网段,这里的接口号就是开头说的通过route print命令查看到的。 例如我的24号接口能够通到目标网段,那么这里就输入24; “-p”这个参数表示该条路由永久生效。如果不加这个参数,那么需要注意,你的这条路由在本机重启后将会失效。
Soft
大文件清理 WinDirStat
编辑器 Notepad3
XShell/MobaXTerm/WindTerm
AutoHotKey