Skip to content

Instantly share code, notes, and snippets.

View leon-sleepinglion's full-sized avatar
🏡
Work From Home

Leon Wee leon-sleepinglion

🏡
Work From Home
View GitHub Profile
@coltenkrauter
coltenkrauter / fix-wsl2-dns-resolution
Last active May 6, 2024 14:11
Fix DNS resolution in WSL2
More recent resolution:
1. cd ~/../../etc (go to etc folder in WSL).
2. echo "[network]" | sudo tee wsl.conf (Create wsl.conf file and add the first line).
3. echo "generateResolvConf = false" | sudo tee -a wsl.conf (Append wsl.conf the next line).
4. wsl --terminate Debian (Terminate WSL in Windows cmd, in case is Ubuntu not Debian).
5. cd ~/../../etc (go to etc folder in WSL).
6. sudo rm -Rf resolv.conf (Delete the resolv.conf file).
7. In windows cmd, ps or terminal with the vpn connected do: Get-NetIPInterface or ipconfig /all for get the dns primary and
secondary.
@bgadrian
bgadrian / set.go
Last active April 23, 2024 13:50
How to implement a simple set data structure in golang
type Set struct {
list map[int]struct{} //empty structs occupy 0 memory
}
func (s *Set) Has(v int) bool {
_, ok := s.list[v]
return ok
}
@leon-sleepinglion
leon-sleepinglion / index.html
Last active February 4, 2017 10:29
Steve Jobs Profile_Free Code Camp Tutorial
<div class="container-fluid">
<h1 class="text-center" style="font-size:400%">Steve Jobs</h1>
<h3 class="text-center"><i>The man in the machine.</i></h3>
<div>
<img class="animated pulse img-rounded img-responsive" src="http://www.heyuguys.com/images/2015/11/steve-jobs-the-man-in-the-machin.jpg" style="height:600px;" alt="Steve jobs sitting"></img>
<p class="text-center">A still from the trailer of Steve Jobs: Man in the Machine</p>
</div>
<div>
<h2>Synopsis</h2>
<p class="synopsis">In his signature black turtleneck and blue jeans, shrouded in shadows below a milky apple, Steve Jobs' image was ubiquitous. But who was the man on the stage? What accounted for the grief of so many across the world when he died? From Oscar-winning
@wsargent
wsargent / win10-dev.md
Last active March 21, 2024 04:27
Windows Development Environment for Scala

Windows 10 Development Environment for Scala

This is a guide for Scala and Java development on Windows, using Windows Subsystem for Linux, although a bunch of it is applicable to a VirtualBox / Vagrant / Docker subsystem environment. This is not complete, but is intended to be as step by step as possible.

Harden Windows 10

Read the entire Decent Security guide, and follow the instructions, especially: