Skip to content

Instantly share code, notes, and snippets.

View brlala's full-sized avatar
🎯
Focusing

Li Heng brlala

🎯
Focusing
View GitHub Profile
@brlala
brlala / deepcopy.go
Created September 22, 2022 11:06 — forked from soroushjp/deepcopy.go
Golang: deepcopy map[string]interface{}. Could be used for any other Go type with minor modifications.
// Package deepcopy provides a function for deep copying map[string]interface{}
// values. Inspired by the StackOverflow answer at:
// http://stackoverflow.com/a/28579297/1366283
//
// Uses the golang.org/pkg/encoding/gob package to do this and therefore has the
// same caveats.
// See: https://blog.golang.org/gobs-of-data
// See: https://golang.org/pkg/encoding/gob/
package deepcopy
@brlala
brlala / WSL2_VPN_Workaround_Instructions.md
Created August 25, 2022 04:35 — forked from machuu/WSL2_VPN_Workaround_Instructions.md
Workaround for WSL2 network broken on VPN

Overview

Internet connection and DNS routing are broken from WSL2 instances, when some VPNs are active. The workaround breaks down into two problems:

  1. Network connection to internet
  2. DNS in WSL2

This problem is tracked in multiple microsoft/WSL issues including, but not limited to: