Skip to content

Instantly share code, notes, and snippets.

View paulczy's full-sized avatar

Paul Czywczynski paulczy

View GitHub Profile
@paulczy
paulczy / .editorConfig
Created July 7, 2025 19:41 — forked from RealDotNetDave/.editorConfig
.editorConfig by David (dotNetDave) McCarter - dotNetTips.com
####################################################################################################
# dotNetDave's (David McCarter) Editor Config - dotNetTips.com
# Updates to this file are posted quarterly at: https://bit.ly/EditorConfig5
# Updated May 1, 2025
# Code performance book is available at: https://bit.ly/DotNetCodePerf4
# Coding standards book is available at: https://bit.ly/CodingStandards8
####################################################################################################
root = true
// Zero-Clause BSD (more permissive than MIT, doesn't require copyright notice)
//
// Permission to use, copy, modify, and/or distribute this software for any purpose
// with or without fee is hereby granted.
//
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
// AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
// OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
# Login to PowerApps for the Admin commands
Write-Host "Installing Module Microsoft.PowerApps.Administration.PowerShell"
Install-Module Microsoft.PowerApps.Administration.PowerShell -Force -Scope CurrentUser
Write-Host "Listing Power App environments..."
Get-AdminPowerAppEnvironment | Format-Table -Property EnvironmentName, DisplayName, Location
Write-Host "Listing Power App environments..."
Get-AdminFlow | Format-Table -Property DisplayName, Enabled, FlowName, EnvironmentName
# Remove the line below if you want to inherit .editorconfig settings from higher directories
root = true
# C# files
[*.cs]
#### Core EditorConfig Options ####
# Indentation and spacing
indent_size = 4
$serverUrl = Read-Host -Prompt "Dynamics URL (ex: https://akoyago.crm.dynamics.com)"
$connectionString = "AuthType=OAuth;Integrated Security=true;Url=$serverUrl;AppId=51f81489-12ee-4a9e-aaae-a2591f45987d;RedirectUri=app://58145B91-0C36-4500-8554-080854F2AC97;TokenCacheStorePath=c:\MyTokenCache\msal_cache.data;LoginPrompt=Auto"
# Login to PowerApps for the Admin commands
Write-Host "Installing Module: Microsoft.PowerApps.Administration.PowerShell"
Install-Module Microsoft.PowerApps.Administration.PowerShell -Force -Scope CurrentUser
#Write-Host "Login to PowerApps for the Admin commands"
# Add-PowerAppsAccount
# Login to PowerApps for the Xrm.Data commands
Write-Host "Installing Module: Microsoft.Xrm.Data.PowerShell -Force -Scope CurrentUser"
@paulczy
paulczy / CustomHtmlGenerator.cs
Created June 24, 2022 16:51 — forked from FWest98/CustomHtmlGenerator.cs
.NET Core 3 Custom Validation Classnames
using System.Collections.Generic;
using System.Text.Encodings.Web;
using Microsoft.AspNetCore.Antiforgery;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.ModelBinding;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.AspNetCore.Mvc.Routing;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
using Microsoft.Extensions.Options;
[CmdletBinding()]
Param(
# gather permission requests but don't create any AppId nor ServicePrincipal
[switch] $DryRun = $false,
# other possible Azure environments, see: https://docs.microsoft.com/en-us/powershell/module/azuread/connect-azuread?view=azureadps-2.0#parameters
[string] $AzureEnvironment = "AzureCloud",
[ValidateSet(
"UnitedStates",
"Preview(UnitedStates)",
@paulczy
paulczy / InstallBromelkampGOmanagerUserConnectorSPN.ps1
Last active May 20, 2022 22:50
InstallBromelkampGOmanagerUserConnectorSPN.ps1
[CmdletBinding()]
Param(
# gather permission requests but don't create any AppId nor ServicePrincipal
[switch] $DryRun = $false,
# other possible Azure environments, see: https://docs.microsoft.com/en-us/powershell/module/azuread/connect-azuread?view=azureadps-2.0#parameters
[string] $AzureEnvironment = "AzureCloud",
[ValidateSet(
"UnitedStates",
"Preview(UnitedStates)",
@paulczy
paulczy / allowlistforpihole.txt
Created November 1, 2021 03:14 — forked from shanselman/allowlistforpihole.txt
A gist with an ALLOW LIST for a PiHole to make sure your XBox and Windows Services keeps working and appropriate anonymized telemetry goes where it needs to go
analytics.twitter.com
api.mixpanel.com
api.segment.io
attestation.xboxlive.com
az416426.vo.msecnd.net
browser.pipe.aria.microsoft.com
c.bing.com
c.msn.com
c1.microsoft.com
cdn-gl.imrworldwide.com
[CmdletBinding()]
Param(
# gather permission requests but don't create any AppId nor ServicePrincipal
[switch] $DryRun = $false,
# other possible Azure environments, see: https://docs.microsoft.com/en-us/powershell/module/azuread/connect-azuread?view=azureadps-2.0#parameters
[string] $AzureEnvironment = "AzureCloud",
[ValidateSet(
"UnitedStates",
"Preview(UnitedStates)",