摘要: js的tcp服务 const net = require('net'); const server = net.createServer((c) => { // 'connection' listener. console.log('client connected'); c.on('end', ( 阅读全文
posted @ 2021-09-04 11:36 whiter001 阅读(50) 评论(0) 推荐(0) 编辑
摘要: $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] = $null gm -inputObject $a get-member -I 阅读全文
posted @ 2021-09-04 11:33 whiter001 阅读(40) 评论(0) 推荐(0) 编辑
摘要: 实现效果, 提示上一条的耗时, 当前事件, 当前git分支, 当前路径 z 自动识别路径调整, 命令行智能提示 code $profile # 下载zoxide; https://github.com/ajeetdsouza/zoxide Invoke-Expression (& { $hook = 阅读全文
posted @ 2021-09-04 11:32 whiter001 阅读(86) 评论(0) 推荐(0) 编辑
摘要: module sqlite的完整源码备份(https://gitee.com/whiter001/sqlite); 原版无人维护, 需要跨平台支持,需自行修改 先安装 install-module sqlite 执行以下demo.ps1文件 import-module SQLite function 阅读全文
posted @ 2021-09-04 11:31 whiter001 阅读(146) 评论(0) 推荐(0) 编辑
摘要: js的小数加减乘除的结果 console.log(1.0 - 0.9); // 0.09999999999999998 console.log(0.3 / 0.1); // 2.9999999999999996 console.log(9.7 * 100); // 969.9999999999999 阅读全文
posted @ 2021-09-04 11:30 whiter001 阅读(146) 评论(0) 推荐(0) 编辑
摘要: 基于PSReadLine 得智能提示, tab健下拉菜单 下载依赖 Install-Module -Name GuiCompletion 注册tab按键 Install-GuiCompletion -Key Tab 或者自定义按键 Set-PSReadlineKeyHandler -Key Alt+ 阅读全文
posted @ 2021-09-04 11:22 whiter001 阅读(305) 评论(0) 推荐(0) 编辑
摘要: Install-Module Microsoft.PowerShell.ConsoleGuiTools code $profile 添加一下代码 # 按f7显示历史记录 function ocgv_history { $line = $null $cursor = $null [Microsoft. 阅读全文
posted @ 2021-09-04 11:19 whiter001 阅读(164) 评论(1) 推荐(0) 编辑