Adapted from Class diagrams
Type: classdiagram
e.g. -idCard : IdCard
Adapted from Class diagrams
Type: classdiagram
e.g. -idCard : IdCard
| using System.Diagnostics; | |
| using System.Text; | |
| using (Process process = new Process()) | |
| { | |
| int timeoutMS = 1000; | |
| process.StartInfo.FileName = "powershell.exe"; | |
| process.StartInfo.Arguments = "-NoLogo -NoProfile -NonInteractive -Command \"&{ Get-DeliveryOptimizationLog }\""; | |
| process.StartInfo.UseShellExecute = false; | |
| process.StartInfo.CreateNoWindow = true; |
| <# | |
| .SYNOPSIS | |
| Combination of "git grep" and "git blame". | |
| #> | |
| function gitgrepblame { | |
| Param([Parameter(Mandatory)][string]$Query) | |
| # grep "--null" uses null separators, blame "-c" uses tab separators. | |
| git.exe --no-pager grep --null --line-number $Query ` | |
| | Select-String -Pattern '(?<Filename>[^\0]+)\0(?<Line>[1-9][0-9]*)\0\s*(?<Text>.+)' ` |
| # Note: This doesn't always work correctly. | |
| # might get: Uninstall-Package: No match was found for the specified search criteria and module names... | |
| # Can remove all az.* packages (and then manually reinstall) using: | |
| # $env:PSModulePath -split ';' | ForEach-Object { Get-ChildItem -Directory -Path (Join-Path $_ 'Az.*') | ForEach-Object { Remove-Item -LiteralPath $_.FullName -Recurse -Verbose -Force } } | |
| # (Which could also be updated to remove just older versions in each folder) | |
| foreach ($module in (Get-Module -ListAvailable -Name 'Az*').Name | Get-Unique) { | |
| $modules = Get-Module -ListAvailable $module | |
| if ($modules.Count -gt 1) { |
| Param([Parameter(Mandatory)][string]$Path) | |
| # Caveats: | |
| # | |
| # Get-AuthenticodeSignature cmdlet has the following limitations: | |
| # * Only first signature is fetched; | |
| # * If the signature is timestamped, no signing time is provided; | |
| # * No signature algorithm information is provided. | |
| $chain = New-Object -TypeName Security.Cryptography.X509Certificates.X509Chain |
| git.exe stash store -m ('WIP on {0}: {1}' -f (git.exe rev-parse --abbrev-ref HEAD), (git.exe log -1 --pretty=format:'%h %s')) (git.exe stash create) | |
| git.exe stash show 0 |
| #pragma comment(linker, "\"/manifestdependency:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"") | |
| #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers | |
| #include <SDKDDKVer.h> | |
| #include <windows.h> | |
| #include "resource.h" | |
| INT_PTR CALLBACK AboutProc( | |
| HWND hDlg, | |
| UINT message, |
| # https://gist.github.com/fnky/458719343aabd01cfb17a3a4f7296797 | |
| function Write-Bold() { | |
| param([Parameter(Mandatory)][string]$Message) | |
| $ESC = [char]27 | |
| "$ESC[1m$Message$ESC[0m" | |
| } | |
| & "$env:LocalAppData\Programs\Microsoft VS Code\bin\code.cmd" --new-window $(git diff --name-only --diff-filter=d HEAD | ForEach-Object { Join-Path (git rev-parse --show-toplevel) $_ }) |