Skip to content

Instantly share code, notes, and snippets.

View paulczy's full-sized avatar

Paul Czywczynski paulczy

View GitHub Profile
// 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
# 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
@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;
@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
@paulczy
paulczy / Instructions.md
Created September 8, 2021 19:25 — forked from NickCraver/Microsoft.PowerShell_profile.ps1
Craver's oh-my-posh profile

Included here are the PowerShell profile I use as well as the oh-my-posh 3 config, but in addition to these you'll need:

  1. The PowerShell modules:
    • For git in PowerShell, I use posh-git
    • For prompt customization, I use oh-my-posh
    • For file/folder icons I use the excellent Terminal-Icons package by @devblackops: https://github.com/devblackops/Terminal-Icons
    • To install each:
Install-Module -Name posh-git -Repository PSGallery
Install-Module -Name oh-my-posh -Repository PSGallery
// MIT License
//
// Copyright (c) 2018 Kristian Hellang
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
@paulczy
paulczy / run-applicationinsights-weeklyemails.csx
Created January 5, 2021 17:34 — forked from SidShetye/run-applicationinsights-weeklyemails.csx
To get application insight emails on a weekly basis. rename to run.csx when moving into azure functions
#r "Newtonsoft.Json"
using System.Configuration;
using System.Net.Mail;
using System.Net.Mime;
using Newtonsoft.Json.Linq;
using Newtonsoft.Json;
private const string AppInsightsApi = "https://api.applicationinsights.io/beta/apps";
@paulczy
paulczy / Windows Defender Exclusions for Developer.ps1
Created November 19, 2020 15:18 — forked from nerzhulart/Windows Defender Exclusions for Developer.ps1
Adds Windows Defender exclusions for developers (Visual Studio, JetBrains Rider, IntellIJ Idea, Git, MsBuild, dotnet, mono etc.)
$userPath = $env:USERPROFILE
$pathExclusions = New-Object System.Collections.ArrayList
$processExclusions = New-Object System.Collections.ArrayList
$pathExclusions.Add('C:\Windows\Microsoft.NET') > $null
$pathExclusions.Add('C:\Windows\assembly') > $null
$pathExclusions.Add($userPath + '\AppData\Local\Microsoft\VisualStudio') > $null
$pathExclusions.Add('C:\ProgramData\Microsoft\VisualStudio\Packages') > $null
$pathExclusions.Add('C:\Program Files (x86)\MSBuild') > $null
$pathExclusions.Add('C:\Program Files (x86)\Microsoft Visual Studio 14.0') > $null
@paulczy
paulczy / SSMS17-HiDPI.ps1
Created April 30, 2017 11:23 — forked from NickCraver/SSMS17and17-HiDPI.ps1
PowerShell: SSMS 17 HiDPI Enable
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\SideBySide" -Name PreferExternalManifest -Value 1 -Type DWord;
'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3"><asmv3:application><asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings"><dpiAware>True</dpiAware></asmv3:windowsSettings></asmv3:application><dependency><dependentAssembly><assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="X86" publicKeyToken="6595b64144ccf1df" language="*" /></dependentAssembly></dependency><dependency><dependentAssembly><assemblyIdentity type="win32" name="debuggerproxy.dll" processorArchitecture="X86" version="1.0.0.0"></assemblyIdentity></dependentAssembly></dependency></assembly>' | Out-File -FilePath "C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio\Ssms.exe.mani