Skip to content

Instantly share code, notes, and snippets.

View thgossler's full-sized avatar

Thomas Gossler thgossler

  • Erlangen, Germany
  • 07:20 (UTC +02:00)
  • X @thgossler
View GitHub Profile
@thgossler
thgossler / myconfig.omp.json
Last active December 30, 2025 20:32
Oh-my-Posh Config (zsh, pwsh)
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"version": 3,
"blocks": [
{
"type": "prompt",
"alignment": "left",
"segments": [
{
"type": "session",
@thgossler
thgossler / GitHubCopilotAutoApproveConfig.jsonc
Last active October 26, 2025 21:20
GitHub Copilot auto-approve JSON config
{
// chat.tools.terminal.autoApprove controls which command lines are auto-approved.
// General rule: EVERYTHING requires approval unless explicitly allowed below.
// The structure is:
// 1) "Dangerous / mutating / high-impact" rules that REQUIRE approval.
// 2) (blank line)
// 3) Safe, read-only, or scoped commands that are AUTO-APPROVED.
//
// IMPORTANT: Remove all comments before pasting this into VS Code settings JSON.
@thgossler
thgossler / GetAllAzureResourceTypesWithKinds.ps1
Last active September 19, 2025 14:39
GetAllAzureResourceTypesWithKinds.ps1
$resourceTypesAndKinds = @{}
$PSStyle.Progress.MaxWidth = 150
$subscriptions = Get-AzSubscription | Where-Object { $_.State -ne 'Disabled' } | Sort-Object Name; foreach ($subscription in $subscriptions) {
Set-AzContext -Subscription $subscription.Id
$resourceProviders = Get-AzResourceProvider | Sort-Object ProviderNamespace; foreach ($provider in $resourceProviders) {
$providerNamespace = $provider.ProviderNamespace
foreach ($resourceType in $provider.ResourceTypes | Sort-Object ResourceTypeName) {
$resourceTypeName = $resourceType.ResourceTypeName
$concatenatedString = "$providerNamespace/$resourceTypeName"
$resourceTypesAndKinds[$concatenatedString] = $true
@thgossler
thgossler / CommandLine.cs
Last active December 21, 2022 02:42
Workaround for not supported commandLineArgs for WSL launch profile with Visual Studio remote debugging
// Slightly modified version of the code posted in https://stackoverflow.com/a/64236441/7422811
// License: Attribution-ShareAlike 2.5 Generic (CC BY-SA 2.5), https://creativecommons.org/licenses/by-sa/2.5/
using System.Text;
/// <summary>
/// Helper functions to parse a command line string into a command line argument array in
/// the same way as .NET does. Tested with .NET 6 on Windows and Ubuntu Linux.
/// </summary>
internal static class CommandLine