Skip to content

Instantly share code, notes, and snippets.

View heyeshuang's full-sized avatar
🌊
going with the flow

贺叶霜 heyeshuang

🌊
going with the flow
View GitHub Profile
@braian87b
braian87b / dumb-ap-wired-link.sh
Last active June 20, 2024 11:54
How to setup a Dumb AP, Wired backbone for OpenWRT / LEDE
@lilydjwg
lilydjwg / colors.py
Last active May 22, 2024 05:17
colors.py: show all kinds of terminal colors at a glance
#!/usr/bin/python3
from functools import partial
def colors16():
for bold in [0, 1]:
for i in range(30, 38):
for j in range(40, 48):
print(f'\x1b[{bold};{i};{j}m {bold};{i};{j} |\x1b[0m', end='')
print()
@tdcosta100
tdcosta100 / WSL2GUIXvnc-en.md
Last active July 5, 2024 08:03
A tutorial to use GUI in WSL2 replacing original XServer by Xvnc, allowing WSL to work like native Linux, including login screen

WSL2 with GUI using Xvnc

Note

If you want to use pure WSLg, you can try the new WSLg tutorial.

In this tutorial, we will setup GUI in WSL2, and access it using VNC. No additional software outside WSL (like VcXsrv) is required, except, of course, a VNC Viewer (RealVNC, TightVNC, TigerVNC, UVNC, etc, all of them might work flawlessly).

The key component we need to install is the desktop metapackage you want (GNOME, KDE, Xfce, Budgie, etc) and tigervnc-standalone-server.

For this setup, I will use Ubuntu (20.04, 22.04 and 24.04 are working), and install GNOME Desktop. Since the key components aren't bound to Ubuntu or GNOME, you can use your favorite distro and GUI. Check the Sample screenshots section for examples.

@z0mb1e-kgd
z0mb1e-kgd / reresolve-dns.ps1
Created February 18, 2022 20:25
Wireguard reresolve-dns Powershell script for Windows
# Copyright (C) 2021 Max Schulze. All Rights Reserved.
# near-literal Translation of the linux version by Jason A. Donenfeld
# to decrypt the dpapi Credentials, you have to be the same user as the wireguard tunnel service, i.e. "nt authority\system", check with "whoami"
# this script might be called by task scheduler as
# powershell -NoProfile -NoLogo -NonInteractive -ExecutionPolicy Bypass -Command "Get-ChildItem -File 'c:\Program Files\wireguard\data\configurations\*.dpapi' | foreach {& C:\<path to script>\wireguard_reresolve-dns.ps1 $_.FullName}"
# if you want to try it in cmd, remember to elevate the user, i.e. with psexec from sysutils
# psexec -s -i powershell -NoPr...
Set-StrictMode -Version 3