Skip to content

Instantly share code, notes, and snippets.

View tonidy's full-sized avatar

toni dy tonidy

View GitHub Profile
@gildas
gildas / win-openssh.md
Last active May 28, 2025 16:38
Deploy OpenSSH on Windows 2019 Full and Core

Deploy OpenSSH on Windows Server 2019

Goals

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.

Acknowledgments

@umair-me
umair-me / mock.cs
Last active July 7, 2022 03:00
Mock Configuration.GetSection
Mock<IConfiguration> configuration = new Mock<IConfiguration>();
configuration.Setup(c => c.GetSection(It.IsAny<String>())).Returns(new Mock<IConfigurationSection>().Object);
@vurihuang
vurihuang / go-orm-with-transaction-2.go
Last active May 29, 2023 10:21
go orm with transaction.
package main
import (
"errors"
"fmt"
_ "github.com/go-sql-driver/mysql"
"github.com/jinzhu/gorm"
)
@xmeng1
xmeng1 / wsl2-network.ps1
Created July 14, 2019 06:50
WSL2 Port forwarding port to linux
$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;
}
@thejohnfreeman
thejohnfreeman / Dockerfile
Last active February 12, 2022 10:47
Trying to install anything from Visual Studio in a Docker container
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
@chronitis
chronitis / jupyter_kernel_list.md
Last active May 28, 2025 10:58
Updated Jupyter Kernels page

What is a kernel?

The kernel lets you run code in a particular programming language using one of the Jupyter tools, such as the Notebook, Jupyterlab or nteract. Installing additional kernels will let you run code in more languages using your existing jupyter installation.

Technically, the kernel is an application which speaks the Jupyter Messaging Protocol, to receive code input from the frontend and respond with the results.

Which kernels do I have installed?

In the Notebook or JupyterLab, the list of available kernels will be shown when trying to create a new notebook.

@mcenirm
mcenirm / README.md
Created May 18, 2019 16:27
Create multiboot USB stick on macOS