Skip to content

Instantly share code, notes, and snippets.

View nikanos's full-sized avatar

Nikanos Polykarpou nikanos

  • ::1, Nicosia, Cyprus
View GitHub Profile
@nikanos
nikanos / Create-SelfSignedCert.ps1
Last active April 8, 2024 07:55
Powershell script example to create a self-signed certificate valid for 10 years and stored in Personal store of LocalMachine
# Create a 10-year self-signed certificate for www.abc.cde domain and store it in Personal store of Computer (LocalMachine)
# The command needs to run from an elevated powershell window
New-SelfSignedCertificate -DnsName www.abc.cde -NotAfter (Get-Date).AddYears(10) -CertStoreLocation cert:\LocalMachine\My
@nikanos
nikanos / WebApiMockResponse.linq
Last active May 1, 2024 19:16
LINQPad 5 (.NET Framework) Query to mock API Responses
<Query Kind="Program">
<Reference>&lt;RuntimeDirectory&gt;\System.Net.Http.dll</Reference>
<Reference>&lt;RuntimeDirectory&gt;\System.Windows.Forms.dll</Reference>
<NuGetReference>Microsoft.AspNet.WebApi.OwinSelfHost</NuGetReference>
<Namespace>Microsoft.Owin.Hosting</Namespace>
<Namespace>Owin</Namespace>
<Namespace>System.Net</Namespace>
<Namespace>System.Net.Http</Namespace>
<Namespace>System.Threading.Tasks</Namespace>
<Namespace>System.Web.Http</Namespace>