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
| <?xml version="1.0" encoding="utf-16"?> | |
| <StorableColorTheme xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | |
| <Keys> | |
| <string>ErrorForegroundColor</string> | |
| <string>ErrorBackgroundColor</string> | |
| <string>WarningForegroundColor</string> | |
| <string>WarningBackgroundColor</string> | |
| <string>VerboseForegroundColor</string> | |
| <string>VerboseBackgroundColor</string> | |
| <string>DebugForegroundColor</string> |
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
| #!/bin/bash | |
| ############################################################################################ | |
| # | |
| # Script used testing access to an Azure storage account with a private endpoint | |
| # | |
| ############################################################################################ | |
| # | |
| # Argument parsing |
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
| [CmdletBinding()] | |
| param ( | |
| [Parameter(Mandatory=$true)] | |
| [ValidateSet("Top", "Bottom")] | |
| [string] | |
| $Position | |
| ) | |
| # 0 - Left (doesn't work well) | |
| # 1 - Top |
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
| function OutputStatus($message){ | |
| try { | |
| [Console]::SetCursorPosition(0,0) | |
| Write-Host $message.PadRight([Console]::BufferWidth) | |
| } | |
| catch [System.IO.IOException] { | |
| ## IO Exception when unable to set position | |
| } | |
| } | |
| $messages = @() |
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
| param( | |
| $templateFile, | |
| [switch] $includeParametersWithDefaults | |
| ) | |
| $template = Get-Content $templateFile | ConvertFrom-Json | |
| function getDefaultValue($type){ | |
| switch ($type){ | |
| "bool" {'false'} | |
| "int" {0} |
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
| param($resourceGroupName) | |
| # note that this requires jq: https://stedolan.github.io/jq/download/ | |
| $deploymentName=$(azure group deployment list $resourceGroupName --json | jq "[.[] | {name:.name, timestamp: .properties.timestamp } ] | sort_by(.timestamp) | reverse | .[0].name" --raw-output) | |
| azure group deployment operation list --resource-group $resourceGroupName --name $deploymentName --json | jq '[.[] | .properties | { provisioningState : .provisioningState, timestamp: .timestamp, resourceType:.targetResource.resourceType,resourceName:.targetResource.resourceName}] | sort_by(.timestamp)' |
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
| # gets information for non-succeeded deployment operations for the last deployment for the resource group specified in $resourceGroupName | |
| Get-AzureResourceGroupDeployment -ResourceGroupName $resourceGroupName | sort -Descending -Property Timestamp | select -First 1 | Get-AzureResourceGroupDeploymentOperation | ?{ $_.Properties.ProvisioningState -ne "Succeeded" } | select -ExpandProperty Properties | ConvertTo-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
| [CmdletBinding()] | |
| param ( | |
| [string] $filename | |
| ) | |
| $matches = $env:Path.Split(';') | %{ join-path $_ $filename} | ?{ test-path $_ } | |
| if ($matches.Length -eq 0){ | |
| "No matches found" | |
| } else { |
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
| $env:HOME="" # avoid conflicts with devcontainers across OSes | |
| $env:GIT_SSH="C:\Windows\System32\OpenSSH\ssh.exe" # set git to use the OpenSSH install and pick up keys from the SSH Agent (avoiding prompting for passphrases) |
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
| function Get-KeyState([uint16]$keyCode) | |
| { | |
| $signature = '[DllImport("user32.dll")]public static extern short GetKeyState(int nVirtKey);' | |
| $type = Add-Type -MemberDefinition $signature -Name User32 -Namespace GetKeyState -PassThru | |
| return [bool]($type::GetKeyState($keyCode) -band 0x80) | |
| } | |
| $VK_SHIFT = 0x10 | |
| function OutputStatus($message){ | |
| try { | |
| [Console]::SetCursorPosition(0,0) |
NewerOlder