| description | tools | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Guidelines for generating SQL statements and stored procedures |
|
- all tables should have a primary key constraint
- all foreign key constraints should have a name
- all foreign key constraints should be defined inline
| description | tools | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Guidelines for generating SQL statements and stored procedures |
|
編輯 %UserProfile%\.wslconfig 檔案
Command Prompt
notepad %UserProfile%\.wslconfigWindows PowerShell
| using namespace System.Management.Automation | |
| using namespace System.Management.Automation.Language | |
| if ($host.Name -eq 'ConsoleHost') | |
| { | |
| Import-Module PSReadLine | |
| } | |
| Set-PSReadLineOption -PredictionSource History | |
| Set-PSReadLineOption -PredictionViewStyle ListView |
| # Debug support provided by common PowerShell function parameters, which is natively aliased as -d or -db | |
| # https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_commonparameters?view=powershell-7.4#-debug | |
| param( | |
| [ValidateSet('gh', 'git', 'shell')] | |
| [Alias('t')] | |
| [String]$Target = 'shell', | |
| [Parameter(Position=0, ValueFromRemainingArguments)] | |
| [string]$Prompt | |
| ) |
This powershell script modifies the Base Image, or the Virtual Hard Disk, which the Windows Sandbox launches upon startup. It will copy the required files to the sandbox and add a registry key which will install them upon startup. By default the script will install the latest stable release of Winget. You can specify to use the latest pre-release with the -PreRelease switch.
When a new version of Winget is released, run this script again to update the installation in the sandbox to the latest version
| { | |
| "explorer.openEditors.visible": 0, | |
| "workbench.colorTheme": "Default Light+", | |
| "workbench.iconTheme": "vscode-simpler-icons", | |
| "workbench.sideBar.location": "right", | |
| // 需下載安裝 Fira Code 字型 (安裝 OTF 格式) | |
| // https://github.com/tonsky/FiraCode/releases | |
| // 需下載客製化過的 Microsoft YaHei Mono 字型 |
| # winget parameter completion | |
| Register-ArgumentCompleter -Native -CommandName winget -ScriptBlock { | |
| param($wordToComplete, $commandAst, $cursorPosition) | |
| [Console]::InputEncoding = [Console]::OutputEncoding = $OutputEncoding = [System.Text.Utf8Encoding]::new() | |
| $Local:word = $wordToComplete.Replace('"', '""') | |
| $Local:ast = $commandAst.ToString().Replace('"', '""') | |
| winget complete --word="$Local:word" --commandline "$Local:ast" --position $cursorPosition | ForEach-Object { | |
| [System.Management.Automation.CompletionResult]::new($_, $_, 'ParameterValue', $_) | |
| } | |
| } |
| # 移除兩個不實用的 Cmdlet Aliases | |
| If (Test-Path Alias:curl) {Remove-Item Alias:curl} | |
| If (Test-Path Alias:wget) {Remove-Item Alias:wget} | |
| # 快速開啟 c:\windows\system32\drivers\etc\hosts 檔案 | |
| function hosts { notepad c:\windows\system32\drivers\etc\hosts } | |
| # 快速產生一組亂數密碼 (預設會產生 10 個字元的密碼) | |
| function New-Password { | |
| <# |