Skip to content

Instantly share code, notes, and snippets.

View HotspurHN's full-sized avatar
🐿️

Siarhei HotspurHN

🐿️
View GitHub Profile
using DocumentFormat.OpenXml.Packaging;
using DocumentFormat.OpenXml.Wordprocessing;
namespace ConsoleApp2
{
class Program
{
static void Main(string[] args)
{
using (WordprocessingDocument doc =
[chat.CONNECT]: function ({ commit }, token) {
console.log('******SIGNALR CONNECTION*********');
console.log(connection);
if (!connection) {
console.log("Init SignalR", token)
connection = new HubConnectionBuilder()
.withUrl('https://localhost:44317/chat', {
accessTokenFactory: () => {
return token;
}
@HotspurHN
HotspurHN / UpdateIISExpressCertificate.ps1
Created August 21, 2018 06:44 — forked from camieleggermont/UpdateIISExpressCertificate.ps1
This powershell script generates a new certificate, removes the old certificate assignments from the IISExpress ssl ports and adds the newly generated one. The certificate is also copied over to the Trusted Root Certificate Authorities.
$cert = New-SelfSignedCertificate -DnsName "localhost", "localhost" -CertStoreLocation "cert:\LocalMachine\My" -NotAfter (Get-Date).AddYears(5)
$thumb = $cert.GetCertHashString()
For ($i=44300; $i -le 44399; $i++) {
netsh http delete sslcert ipport=0.0.0.0:$i
}
For ($i=44300; $i -le 44399; $i++) {
netsh http add sslcert ipport=0.0.0.0:$i certhash=$thumb appid=`{214124cd-d05b-4309-9af9-9caa44b2b74a`}
}