1. create code signing certificate New-SelfSignedCertificate -FriendlyName “Friendly Name Code Signing Example” -CertStoreLocation Cert:\CurrentUser\My -Subject “ExampleName” -Type CodeSigningCert 2. locate…
TPM 2.0
Enable/Disable TPM support in UEFI BIOS Restart your computer Enter BIOD by pressing F2 or DEL Navigate to “Advanced” tab…
Using strongly-typed entity IDs to avoid primitive obsession
Courtesy of Andrew Lock. public readonly struct OrderId : IComparable<OrderId>, IEquatable<OrderId> { public Guid Value { get; } public OrderId(Guid…
AutoMapper Usage Guidelines
Coutesy of Jimmy Bogard Configuration √ DO initialize AutoMapper once with Mapper.Initialize at AppDomain startup in legacy ASP.NET AutoMapper’s static initialization is designed…
What types should I use to pass collections in C#?
Use IEnumerable<T> where possible Avoid passing concrete collection types Avoid modifying collections passed as parameters Consider IReadOnlyCollection<T> if you need to enumerate multiple times…
PowerShell script to register Windows Service
#Requires -Version 6.2 #Requires -RunAsAdministrator param( [Parameter(mandatory=$true)] [string] $Name, [Parameter(mandatory=$true)] [string] $DisplayName, [Parameter(mandatory=$true)] [string] $Description, [Parameter(mandatory=$true)] [System.IO.FileInfo] $Exe, [Parameter(mandatory=$true)] [string]…
Storing confidential information in config files externally
This is the exract of the article written by Peter Morlion of subMain You should consider not putting confidential information…
4 Common Datetime Mistakes in C# and How to Avoid Them
Four common mistakes C#/.NET developers make when dealing with time and what should do to avoid them and make your…
Error message “node-gyp@x.x.x should be installed with -g” when installing @angular/cli
Delete package-lock.json Delete node_modules folder Install node-gyp npm install -g node-gyp Install @angular/cli npm i -g @angular/cli
npm install ->Failed at the node-sass@x.x.x postinstall script
Problem Error appears when trying to do npm install: Failed at the node-sass@x.x.x postinstall script. Solution Delete package-lock.json Delete node_modules…