Skip to content

Instantly share code, notes, and snippets.

Investigating a better artifact workflow

Jake Morrison techthoughts2

Investigating a better artifact workflow
Block or report user

Report or block techthoughts2

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View suppress
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidUsingCmdletAliases", "", Justification = "Invoke-Build is alias only")]
param ()
View keybindings
// Place your key bindings in this file to override the defaultsauto[]
"key": "alt+`",
"command": "shellLauncher.launch"
"key": "ctrl+shift+c",
"command": "PowerShell.ShowAdditionalCommands",
"when": "editorLangId == 'powershell'"
techthoughts2 / console_color
Created Nov 12, 2019
Change the color of the console output
View console_color
$host.PrivateData.ErrorForegroundColor = [System.ConsoleColor]::Magenta
View mdh_multiline_examples
(## EXAMPLE [^`]*)(```\r\n)([^`]*)(```\r\n)(\r\n)([^#]*)(\r\n\r\n)+([^#]+)(#)
(## EXAMPLE [^`]+?```\r\n[^`\r\n]+?\r\n)(```\r\n\r\n)([^#]+?\r\n)(\r\n)
(## EXAMPLE [^`]+?```\r\n[^`\r\n]+?\r\n)(```\r\n\r\n)([^#]+?\r\n)(\r\n)([^#]+)(#)
New-MarkdownHelp -Module MyModuleToDocument -OutputFolder $OutputDir -Force
$OutputDir | Get-ChildItem -File | ForEach-Object {
# fix formatting in multiline examples
View bom_adjust
$content = Get-Content 'Get-TelegramStickerPackInfo.Tests.ps1'
$Utf8NoBomEncoding = New-Object System.Text.UTF8Encoding $true
$path = [System.Environment]::CurrentDirectory = (Get-Location).Path
$MyPath = "$path\Get-TelegramStickerPackInfo.Tests.ps1"
[System.IO.File]::WriteAllLines($MyPath, $content, $Utf8NoBomEncoding)
$content = Get-Content 'Send-TelegramSticker.Tests.ps1'
$Utf8NoBomEncoding = New-Object System.Text.UTF8Encoding $true
$path = [System.Environment]::CurrentDirectory = (Get-Location).Path
techthoughts2 / vscode_basic_powershell_settings.json5
Last active Jul 21, 2019
Basic VSCode settings for PowerShell development
View vscode_basic_powershell_settings.json5
// editor
"editor.quickSuggestionsDelay": 1,
"editor.tabCompletion": "on",
"files.defaultLanguage": "powershell",
// default shell
// Windows
// PowerShell 6
"": "C:\\Program Files\\PowerShell\\6\\pwsh.exe",
View install_chrome
$P = $env:TEMP + '\chrome_installer.exe'; Invoke-WebRequest '' -OutFile $P; Start-Process -FilePath $P -Args '/silent /install' -Verb RunAs -Wait; Remove-Item $P
View fill_hard_drive.ps1
[io.file]::Create("$env:temp\reallybigfile-deleteme.txt").SetLength((gwmi Win32_LogicalDisk -Filter "DeviceID='C:'").FreeSpace - 1KB).Close
View c_sharp_basics
// This is a comment
This is a section of comments
Console.Read(); //this is an inline comment
int aNumber = 0; //declare value type variable
float num1 = 20.9;
View ps_module_update_check
Get-InstalledModule | Select-Object Name, @{n='Installed';e={$_.Version}}, @{n='Available';e={(Find-Module -Name $_.Name).Version}} | Where-Object {$_.Available -gt $_.Installed}
You can’t perform that action at this time.