Internet connection and DNS routing are broken from WSL2 instances, when some VPNs are active.
The root cause seems to be that WSL2 and the VPN use the same IP address block, and the VPN routing clobbers WSL2's network routing.
This problem is tracked in multiple microsoft/WSL issues including, but not limited to:
CTRL + A
: Move the cursor to the beginning of the line
CTRL + E
: Move the cursor to the end of the line
OPTION + Left Arrow
: Move the cursor one word backward
OPTION + Right arrow
: Move the cursor one word forward
Left Arrow
: Move the cursor one character backward
Right Arrow
: Move the cursor one character forward
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://vexx32.github.io/2018/10/26/Anonymous-Functions/ | |
function Retry() | |
{ | |
param( | |
[Parameter(Mandatory=$true)][Action]$action, | |
[Parameter(Mandatory=$false)][int]$maxAttempts = 3 | |
) | |
$attempts=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// NuGet Packages | |
// Serilog.Enrichers.Environment | |
// Serilog.Sinks.ApplicationInsights | |
// Serilog.Sinks.Console | |
open System | |
open Serilog | |
open Serilog.Events | |
[<RequireQualifiedAccess>] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class DapperExtensions | |
{ | |
private static readonly IEnumerable<TimeSpan> RetryTimes = new[] | |
{ | |
TimeSpan.FromSeconds(1), | |
TimeSpan.FromSeconds(2), | |
TimeSpan.FromSeconds(3) | |
}; | |
private static readonly AsyncRetryPolicy RetryPolicy = Policy |
I suggest that you create one or more Api.fs
files to expose F# code in a C# friendly way.
In this file:
- Define functions with
PascalCase
names. They will appear to C# as static methods. - Functions should use tuple-style declarations (like C#) rather than F#-style params with spaces.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Param( | |
[Parameter(Mandatory=$true)] | |
[string] $Url, | |
[Parameter(Mandatory=$true)] | |
[int] $MaxPages, | |
[bool] $IncludeImages = $true, | |
[bool] $StayOnDomain = $true, | |
[bool] $IgnoreFragments = $true) | |
Add-Type -AssemblyName System.Web |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>jwt.ms: Welcome!</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.8.3/modernizr.min.js"></script> | |
<style> | |
@import url("https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,700");html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline |
NewerOlder