Skip to content

Instantly share code, notes, and snippets.

View shurick81's full-sized avatar

Aleksandr Sapozhkov shurick81

View GitHub Profile
@shurick81
shurick81 / README.md
Last active December 14, 2025 23:08
MacOS VM

mac-vms

Programmatically create macOS ARM64 virtual machines that have desktop/GUI interface on Apple Silicon using macosvm.

Setup

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
cd /opt/homebrew/bin/
ls
@shurick81
shurick81 / claude-code-authentication-methods.md
Last active December 22, 2025 22:04
Experiments: Claude Code Installation in Mac

Process Monitoring

Mac and in Windows WSL:

for pid in $(pgrep claude); do
  cmd=$(ps -p $pid -o command= | awk '{print $1}')
  [ "$cmd" = "claude" ] && cmd=$(which claude)
  echo "$pid: $cmd"
done
@shurick81
shurick81 / VMs.sh
Last active January 1, 2026 16:19
Mac Provisioning
pkg_url=$(mist list installer 24F74 -o yaml -q | yq '.[].packages[] | select(.url | test("InstallAssistant.pkg")) | .url');
curl -L $pkg_url -o InstallAssistant.pkg
ipsw_url=$(mist list ipsw 24F74 -o yaml -q | yq '.[0].url');
filename=$(basename "$ipsw_url");
curl -L $ipsw_url -o $filename -C - --retry 5 --retry-all-errors;
vm_name="macOS-Sequoia"
vm_dir="~/Library/Containers/com.utmapp.UTM/Data/Documents/$vm_name.utm"
@shurick81
shurick81 / log
Created March 13, 2023 11:42
Dynamics 365 CE On-Premises 9.1.16 New Organization Swedish
This file has been truncated, but you can view the full file.
2023-03-13 10:04:38.384| Info| Deployment Manager Start
2023-03-13 10:04:39.041|Verbose| Retrieving config database version Data Source=SWAZSRV00\SqlInstance01;Initial Catalog=MSCRM_CONFIG;Integrated Security=True;Enlist=False;Connect Timeout=30;Application Name=MSCRMmmc;Workstation ID=SWAZSRV00.mmc ...
2023-03-13 10:04:39.041| Info| Config database version: 9.1.16.20.
2023-03-13 10:04:41.043| Info| Creating table: DBUpdateInstallInfo
2023-03-13 10:04:41.059| Info| Found the older table DBUpdateInstallInfo_V5, updating new table and deleting
2023-03-13 10:04:41.059| Info| GetDBUpdateRevisionThresholdForServer(): Threshold = 9.1.0016.0020.
2023-03-13 10:04:41.090|Verbose| Getting number of organizations Data Source=SWAZSRV00\SqlInstance01;Initial Catalog=MSCRM_CONFIG;Integrated Security=True;Enlist=False;Connect Timeout=30;Application Name=MSCRMmmc;Workstation ID=SWAZSRV00.mmc ...
@shurick81
shurick81 / DSC_SqlRS.psm1
Created March 9, 2023 16:56
SqlServerDsc 16.1.0 Adjusted 00
$script:sqlServerDscHelperModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SqlServerDsc.Common'
$script:resourceHelperModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\DscResource.Common'
Import-Module -Name $script:sqlServerDscHelperModulePath
Import-Module -Name $script:resourceHelperModulePath
$script:localizedData = Get-LocalizedData -DefaultUICulture 'en-US'
<#
.SYNOPSIS
@shurick81
shurick81 / DSC_SqlRS.psm1
Created March 9, 2023 07:06
SqlServerDsc 15.2.0 Adjusted
$script:sqlServerDscHelperModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SqlServerDsc.Common'
$script:resourceHelperModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\DscResource.Common'
Import-Module -Name $script:sqlServerDscHelperModulePath
Import-Module -Name $script:resourceHelperModulePath
$script:localizedData = Get-LocalizedData -DefaultUICulture 'en-US'
<#
.SYNOPSIS
@shurick81
shurick81 / DSC_SqlRS.psm1
Created March 9, 2023 06:54
SqlServerDsc 16.1.0 Adjusted
$script:sqlServerDscHelperModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SqlServerDsc.Common'
$script:resourceHelperModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\DscResource.Common'
Import-Module -Name $script:sqlServerDscHelperModulePath
Import-Module -Name $script:resourceHelperModulePath
$script:localizedData = Get-LocalizedData -DefaultUICulture 'en-US'
<#
.SYNOPSIS
@shurick81
shurick81 / windows.ps1
Last active December 27, 2024 18:32
Virtual Desktop Provisioning
# Run in PS with elevated privileges
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
choco install -y googlechrome
choco install -y git
choco install -y vscode
choco install -y docker-engine
Enable-WindowsOptionalFeature -Online -FeatureName "Microsoft-Windows-Subsystem-Linux", "VirtualMachinePlatform" -NoRestart
Invoke-WebRequest -Uri https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi -OutFile wsl_update_x64.msi -UseBasicParsing
Start-Process msiexec.exe -Wait -ArgumentList "/I $((Get-Location).Path)\wsl_update_x64.msi /quiet"
# Reboot the machine before you continue
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<appSettings>
<add key="EndpointAuth:Audience" value="https://crmbtsjobstest.onmicrosoft.com/crm-bts-asy-loc" />
<add key="EndpointAuth:Tenant" value="crmbtsjobstest.onmicrosoft.com" />
<add key="KeyVault:VaultUrl" value="https://crm-bts-asy-loc.vault.azure.net" />
<add key="TestEndpoint:AudienceUri" value="https://crmbtsjobstest.onmicrosoft.com/crm-bts-goldfish" />
<add key="ProdEndpoint:AudienceUri" value="https://crmbtsjobstest.onmicrosoft.com/crm-bts-hyx-can" />
<add key="ProdEndpoint:EndpointUri" value="https://can.hyx.crmbts.net" />
</appSettings>
@shurick81
shurick81 / 9.0.24 updated to 9.1.3.xml
Created August 19, 2021 09:27
Dynamics 9.1.3 updated C:\Program Files\Dynamics 365\Server\bin\CrmAsyncService.exe.config
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<appSettings>
<add key="EndpointAuth:Audience" value="https://crmbtsjobstest.onmicrosoft.com/crm-bts-asy-loc" />
<add key="EndpointAuth:Tenant" value="crmbtsjobstest.onmicrosoft.com" />
<add key="KeyVault:VaultUrl" value="https://crm-bts-asy-loc.vault.azure.net" />
<add key="TestEndpoint:AudienceUri" value="https://crmbtsjobstest.onmicrosoft.com/crm-bts-goldfish" />
<add key="ProdEndpoint:AudienceUri" value="https://crmbtsjobstest.onmicrosoft.com/crm-bts-hyx-can" />
<add key="ProdEndpoint:EndpointUri" value="https://can.hyx.crmbts.net" />
</appSettings>