Skip to content

Instantly share code, notes, and snippets.

View tinohager's full-sized avatar

Tino Hager tinohager

View GitHub Profile
@tinohager
tinohager / gist:8fd995c3c4e40ee111a87fec93e2cc0f
Created February 9, 2021 11:55
Use Windows internal SSH
# Change the Windows Service config for "OpenSSH Authentication Agent"
sc config "ssh-agent" start=delayed-auto
sc start "ssh-agent"
# Create a private/public key pair
ssh-keygen -t ecdsa -b 521 -f myKey
ssh-add myKey
ssh root@123.123.123.123
@tinohager
tinohager / self-signed-certificate.ps1
Last active September 30, 2020 14:42
Generating self-signed certificate on windows
$url = "https://github.com/IndySockets/OpenSSL-Binaries/raw/master/openssl-1.0.2s-x64_86-win64.zip"
$zipPath = "$PSScriptRoot\openssl.zip"
$openSslPath = "$PSScriptRoot\openssl"
$openSsl = "$($openSslPath)\openssl.exe"
Invoke-WebRequest -Uri $url -OutFile $zipPath
Expand-Archive $zipPath -DestinationPath $openSslPath
&$openSsl genrsa -out private.key 4096
&$openSsl req -new -sha256 -out private.csr -key private.key -config ssl.conf
@tinohager
tinohager / build.ps1
Last active May 18, 2018 21:57
Build script with unit test and nuget push, for visual studio 2017 community and BuildTools
$buildEnvironmentVisualStudio2017BuildTools = "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\";
$buildEnvironmentVisualStudio2017Community = "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\";
$msbuild = "";
$vstest = "";
$nuget = "..\nuget.exe";
$nugetDownloadUrl = "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe";
# Detect build environment
@tinohager
tinohager / readme.md
Last active February 6, 2023 15:59
useful tools
import-module ServerManager
Add-WindowsFeature Web-Server, Web-Mgmt-Service, Web-Mgmt-Console, Web-Asp-Net45