Skip to content

Instantly share code, notes, and snippets.

@jikuja
jikuja / 00-README.md
Last active October 13, 2024 11:38
Azure Container App notes

Azure Container App notes | Enviroment creation

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
Created October 11, 2024 07:25
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
@jikuja
jikuja / OS-X-RAMDISK.md
Created June 14, 2024 06:44
OS X RAMDISK usage

OS X RAMDISK Usage

Before creating large disks check from Apple documentation if memory is de-allocated after hdiutil detach[^1]

This guide has only CLI steps: using GUI tools might work but not covered here.

Create a new RAM disk device

hdiutil attach -nomount ram://2097152
@jikuja
jikuja / README.md
Last active March 3, 2024 18:49
Azure Storage acccount types

Storage account types

Configuration on resource property

Kind property

value usage
'BlobStorage' Legacy: Blob Storage
'BlockBlobStorage' Portal: Premium / Block blobs