Skip to content

Instantly share code, notes, and snippets.

View brlala's full-sized avatar
🎯
Focusing

Li Heng brlala

🎯
Focusing
View GitHub Profile
@machuu
machuu / WSL2_VPN_Workaround_Instructions.md
Last active April 18, 2024 23:13
Workaround for WSL2 network broken on VPN

Overview

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:

@jasonboukheir
jasonboukheir / git
Last active March 29, 2024 18:12
git when in unix, git.exe when in wsl
#!/bin/sh
if pwd | grep /mnt/c > /dev/null; then
exec git.exe "$@"
else
exec /usr/bin/git "$@"
fi
@rsudip90
rsudip90 / nullHandle_extends.go
Last active January 3, 2024 21:46
database rows null handling in go by extending types
package main
import (
"database/sql"
"encoding/json"
"fmt"
"log"
"time"
"github.com/go-sql-driver/mysql"
@Shirataki2
Shirataki2 / Keras_Mnist.ipynb
Last active September 3, 2022 09:48
Keras_Mnist.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#198.47.104.134 m10.music.126.net
198.47.104.134 m3.music.126.net
123.58.180.105 m6.music.126.net
174.35.52.182 m9.music.126.net
174.35.25.7 m1.music.126.net
220.243.234.5 m4.music.126.net
174.35.24.139 m7.music.126.net
198.47.104.134 m2.music.126.net
123.58.180.106 m5.music.126.net
220.243.234.8 m8.music.126.net
@Hammster
Hammster / crypto-pbkdf2-example.js
Last active September 2, 2020 12:48 — forked from skeggse/crypto-pbkdf2-example.js
Updated Example of using crypto.pbkdf2 to hash and verify passwords asynchronously, while storing the hash and salt in a single combined buffer along with the original hash settings
const crypto = require('crypto')
// larger numbers mean better security, less
const config = {
// size of the generated hash
hashBytes: 32,
// larger salt means hashed passwords are more resistant to rainbow table, but
// you get diminishing returns pretty fast
saltBytes: 16,
// A selected HMAC digest algorithm specified by digest is applied to derive