- 博客(11)
- 资源 (15)
- 收藏
- 关注
原创 powershell 按F7展开搜索历史记录
Install-Module Microsoft.PowerShell.ConsoleGuiToolscode $profile添加一下代码# 按f7显示历史记录function ocgv_history { $line = $null $cursor = $null [Microsoft.PowerShell.PSConsoleReadLine]::GetBufferState([ref]$line, [ref]$cursor) $selection = $input | Out.
2021-09-03 00:16:36
1074
原创 powershell tab键下拉菜单智能提示
基于PSReadLine 得智能提示, tab健下拉菜单下载依赖Install-Module -Name GuiCompletion注册tab按键Install-GuiCompletion -Key Tab或者自定义按键Set-PSReadlineKeyHandler -Key Alt+Spacebar -ScriptBlock { Invoke-GuiCompletion }
2021-09-02 23:57:55
1020
1
原创 powershell 小数计算
js的小数加减乘除的结果console.log(1.0 - 0.9);// 0.09999999999999998console.log(0.3 / 0.1);// 2.9999999999999996console.log(9.7 * 100);// 969.9999999999999console.log(2.22 + 0.1);// 2.3200000000000003python小数计算 结果0.1 + 0.2# 0.30000000000000004powers
2021-09-02 18:16:34
628
原创 powershell 操作sqlite数据库 增删改查(windows)
先安装install-module sqlite执行以下demo.ps1文件import-module SQLitefunction mount-db { New-PSDrive -PSProvider SQLite -Name db -Root "Data Source=file::memory:,Version=3,New=true" -Scope global | Out-Null; New-Item -path db:/data -Value @{ id = 'INTEGER PR
2021-08-26 22:18:51
714
翻译 start-job pwsh的后台任务文档-案例(机译)
语法Start-Job [-Name <String>] [-ScriptBlock] <ScriptBlock> [-Credential <PSCredential>] [-Authentication <AuthenticationMechanism>] [[-InitializationScript] <ScriptBlock>] [-WorkingDirectory <S
2021-08-26 18:48:53
654
原创 powershell 命令行配置, 执行耗时,当前分支, 智能提示,智能识别跳转路径
实现效果, 提示上一条的耗时, 当前事件, 当前git分支, 当前路径z 自动识别路径调整, 命令行智能提示code $profile# 下载zoxide; https://github.com/ajeetdsouza/zoxideInvoke-Expression (& { $hook = if ($PSVersionTable.PSVersion.Major -lt 6) { 'prompt' } else { 'pwd' } (zoxide init --hook $
2021-08-21 10:19:59
277
原创 tcpServer类似 telent获取返回内容
const net = require('net');const server = net.createServer((c) => { // 'connection' listener. console.log('client connected'); c.on('end', () => { console.log('client disconnected'); }); c.write('hello\r\n'); c.pipe(c);});server.on
2021-05-29 11:33:45
199
原创 ping端口号
Test-NetConnection www.nextofwindows.com -Port 443tnc baidu.com -p 80Test-Connection baidu.com -TcpPort 80
2021-05-29 11:29:54
446
原创 faker.js生成手机号
faker.locale='zh_CN'faker.phone.phoneNumber()// '007-31430711'faker.phone.phoneNumber('135########')// '13517637282'
2021-05-29 10:57:11
831
原创 pwsh的 二维数组的属性方法获取
$a = New-Object 'object[,]' 2,2 # 2-D array of length 4 $a[0,0] = 10 $a[0,1] = $false $a[1,0] = "red" $a[1,1] = $nullgm -inputObject $aget-member -InputObject $a$b = (New-Object 'int[,]' 2,2) $b[0,0] = 10 $b[0,1] = 20 $b[1,0] = 30 $b[1,1] = 40
2021-05-29 10:50:32
280
原创 dontnet 跨平台打包程序
<Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <OutputType>Exe</OutputType> <TargetFramework>net6.0</TargetFramework> <PublishSingleFile>True</PublishSingleFile> <PublishTrimmed>Tr
2021-05-29 10:48:49
341
ripgrep-13.0.0-x86_64-unknown-linux-musl.tar.gz
2021-12-13
gvim_8.2.0014_x64_signed.exe.zip
2019-12-23
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人