Skip to content

Instantly share code, notes, and snippets.

@jikuja
jikuja / gist:d4477b11add4c64db9ce47fa21c7711d
Created October 23, 2024 07:34
Azure Portal tenant selection
Some of the Azure Portal views support injection of tenant or login information. This is useful when creating portal links to some particular tenant.
## query parameters
Query parameter usage is undocumented and is highly possible that on some of the views support those
* tenantHint
* Not sure of works at all
* loginHint
* Works only portal main page
@jikuja
jikuja / README.md
Created October 15, 2024 09:33
Dockerhut API notes
@jikuja
jikuja / 00-Environment-network-and-zone-redunancy.md
Last active October 13, 2024 19:35
Azure Container App notes

Azure Container App notes | Enviroment networking and redunancy

Consume only type

Consumption only environments should be ignored:

  • Legacy
  • Portal does not even support creation of that kind of environments

Zone-redunancy

@jikuja
jikuja / 01-generic.md
Last active October 18, 2024 13:21
PowerShell Confirm, ShouldContinue & ShouldProcess

TBD

$ConfirmPreference

Valid values of $ConfirmPreference:

  • None: PowerShell doesn't prompt automatically. To request confirmation of a particular command, use the Confirm parameter of the cmdlet or function.
  • Low: PowerShell prompts for confirmation before running cmdlets or functions with a low, medium, or high risk.
  • Medium: PowerShell prompts for confirmation before running cmdlets or functions with a medium, or high risk.
  • High: PowerShell prompts for confirmation before running cmdlets or functions with a high risk.
@jikuja
jikuja / 00-README.md
Last active October 12, 2024 16:12
Azure ServiceTags_Public

Virtual network service tags

Helpers for Microsoft provided Virtual network service tags.

Revision 2 functions and tests are from ChatGPT.

TODO

  • Add function to download file from REST API
  • Add transparent caching to persist and re-use downloaded data
@jikuja
jikuja / 00-generic.md
Last active September 27, 2024 07:40
Azure SQL notes

Generic notes

Visibility limitations on resource changes

Change Analysis

Change analysis captures only server and database creations.

Missing:

  • Diagnostics settings
@jikuja
jikuja / Test-ShouldProcess.ps1
Last active September 23, 2024 14:13
PowerShell Confirms
function Test-ShouldProcess {
[CmdletBinding(
SupportsShouldProcess,
ConfirmImpact = 'High'
)]
param(
[Switch]$Force
)
Write-Verbose "`$PSCmdLet: $PSCmdLet"
@jikuja
jikuja / README.md
Last active August 11, 2024 18:19
Command-line magic

Create table placeholder for JIRA/Confluence

echo '|name|x|' ; echo '|----|----|' ; <data generating command here. e.g. pbpaste>  | awk '{print "|"$0"| |"}'

Convert escaped JSON string

@jikuja
jikuja / management-group-level.md
Created July 31, 2024 10:50
Azure activity logs
@jikuja
jikuja / Externsions.md
Last active July 31, 2024 09:25
Monitoring infrastructure

Virtual macine extensions

List all available extensions:

$location = "eastus"  # Specify the location
$publishers = Get-AzVMImagePublisher -Location $location