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
| $Destination = "$home\links\$title.lnk" | |
| $sourcepath =$url | |
| $WshShell = New-Object -comObject WScript.Shell | |
| $Shortcut = $WshShell.CreateShortcut("$Destination") | |
| $Shortcut.TargetPath = $sourcepath |
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
| 以下是一些常用的 Linux 命令,这些命令可以帮助你在 Linux 系统中进行文件管理、系统监控、网络配置等操作。 | |
| ### 文件和目录管理 | |
| 1. **`ls`** — 列出目录内容 | |
| - `ls`:列出当前目录的文件和子目录。 | |
| - `ls -l`:列出详细信息(权限、所有者、大小、修改日期等)。 | |
| - `ls -a`:显示所有文件(包括隐藏文件)。 | |
| 2. **`cd`** — 改变目录 | |
| - `cd /path/to/directory`:切换到指定目录。 |
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. | |
| download WSL | |
| 2.download subsys for WSL | |
| (ubuntu) | |
| PS. | |
| you can use the linux directory | |
| cd /home | |
| you can use linux to download system software(nginx...) | |
| sudo install nginx |
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. |
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
| 列出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
| 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
| $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
| 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
| First :adding action blocks | |
| { | |
| "command": | |
| { | |
| "action":"openNewTabDropdown", | |
| }, | |
| "id":"user.mynewtabdropdown" | |
| } |