This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 模组写入: | |
| foreach ($file in Get-ChildItem "Public"|Where-Object{$_.Name -like "*.ps1"}) { | |
| . $file.FullName | |
| } | |
| 写入windows terminal命令行: | |
| c:\Program Files\PowerShell\7-preview\pwsh.exe -noprofile -noexit /c import-module "C:\Users\Adminnistrator\demo\shell\wt\ezshell\ezshell.psm1" | |
| 复制的时候在开始菜单创建Public文件夹,并在public文件夹中写入要导入的文件 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "id": "User.MySummonQuake", | |
| "command": { | |
| "action": "globalSummon", | |
| "name": "_quake", | |
| "dropdownDuration": 200, | |
| "toggleVisibility": true, | |
| "monitor": "toMouse", | |
| "desktop": "toCurrent" | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 定义目标路径 | |
| $directoryPath = "C:\path\to\your\json\files" | |
| # 获取该路径下所有的 JSON 文件 | |
| $jsonFiles = Get-ChildItem -Path $directoryPath -Filter "*.json" | |
| # 初始化一个空数组来存储所有 JSON 对象 | |
| $jsonArray = @() | |
| # 遍历每个 JSON 文件 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| First :adding action blocks | |
| { | |
| "command": | |
| { | |
| "action":"openNewTabDropdown", | |
| }, | |
| "id":"user.mynewtabdropdown" | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| description: | |
| 因为常常写html,需要导入bootstrap,tailwind,所以写一个gist总结方法 | |
| #jQuery,cdn | |
| <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script> | |
| # | |
| bootstap ,cdn | |
| <link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous"> | |
| <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz" crossorigin="anonymous"></script> | |
| #tailwind |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $parameters = @{ | |
| # setting key for psreadline | |
| Chord = if ($args.Count -eq 0 -or $null -eq $args[0]["Key"]) { "F7" } else { $args[0]["Key"] } | |
| BriefDescription = 'Show Matching Command History' | |
| Description = 'Show Matching Command History using Out-ConsoleGridView' | |
| #setting scriptblock for psreadline | |
| ScriptBlock = { | |
| $params = @{ Global = $false } | |
| if ($F7Diagnostic) { $params["Diagnostic"] = $true } | |
| if ($F7UseNetDriver) { $params["UseNetDriver"] = $true } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Add-Type -AssemblyName System.Windows.Forms | |
| $FileBrowser = New-Object System.Windows.Forms.OpenFileDialog -Property @{ InitialDirectory = [Environment]::GetFolderPath('Desktop') } | |
| $FileBrowser = New-Object System.Windows.Forms.OpenFileDialog -Property @{ | |
| #选择路径 | |
| InitialDirectory = [Environment]::GetFolderPath('Desktop') | |
| #filter 后缀 | |
| Filter = 'Documents (*.docx)|*.docx|SpreadSheet (*.xlsx)|*.xlsx' | |
| } | |
| $Null = $FileBrowser.ShowDialog() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 列出images | |
| docker images | |
| 开启images | |
| docker compose up -d | |
| 列出运行的docker | |
| docker ps | |
| 打开logs | |
| docker compose logs -f | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1.添加项在路径下下 | |
| 2.在项下添加icon字符串 | |
| 3.在项下新建command项 | |
| 4.在command项下的默认字符串添加命令 | |
| 文件右键菜单: | |
| HKEY_CLASSES_ROOT\*\shell\ | |
| 文件夹右键菜单: | |
| HKEY_CLASSES_ROOT\Directory\shell\ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # NOTE: If you are using PowerShell 7+, please run | |
| # Import-Module Appx -UseWindowsPowerShell | |
| # before using Add-AppxPackage. |