We want to install OpenSSH on a Windows Server 2019, so we can remote access it with ssh myuser@win2019
.
We want also to turn on PowerShell Remoting over SSH, so we can create PSSession
objects from PowerShell Core on Linux/MacOs/Windows.
Mock<IConfiguration> configuration = new Mock<IConfiguration>(); | |
configuration.Setup(c => c.GetSection(It.IsAny<String>())).Returns(new Mock<IConfigurationSection>().Object); |
package main | |
import ( | |
"errors" | |
"fmt" | |
_ "github.com/go-sql-driver/mysql" | |
"github.com/jinzhu/gorm" | |
) |
$remoteport = bash.exe -c "ifconfig eth0 | grep 'inet '" | |
$found = $remoteport -match '\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}'; | |
if( $found ){ | |
$remoteport = $matches[0]; | |
} else{ | |
echo "The Script Exited, the ip address of WSL 2 cannot be found"; | |
exit; | |
} |
Table of Contents
FROM mcr.microsoft.com/dotnet/framework/sdk:4.8 | |
# Use the latest release channel. | |
ADD https://aka.ms/vs/16/release/channel C:\TEMP\VisualStudio.chman | |
# Download the Visual Studio Build Tools bootstrapper. | |
ADD https://aka.ms/vs/16/release/vs_buildtools.exe C:\TEMP\vs_buildtools.exe | |
# Download the Visual Studio Community bootstrapper. | |
ADD https://aka.ms/vs/16/release/vs_community.exe C:\TEMP\vs_community.exe |
Based on https://www.pendrivelinux.com/boot-multiple-iso-from-usb-via-grub2-using-linux/#more-5352
Install Homebrew
Install grub
brew install i386-elf-grub
using Microsoft.AspNetCore.Hosting; | |
using Microsoft.AspNetCore.TestHost; | |
using System; | |
using System.Net.Http; | |
namespace Tests | |
{ | |
public class InjectionFixture : IDisposable | |
{ | |
private readonly TestServer server; |
// This file is based on the code from the ASP.NET Core repository | |
// https://github.com/aspnet/AspNetCore/tree/master/src/Middleware/SpaServices.Extensions/src | |
// Copyright (c) .NET Foundation. All rights reserved. | |
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. | |
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.IO; | |
using System.Net; |