Skip to content

Instantly share code, notes, and snippets.

View kenvix's full-sized avatar
🐟
🐟🐟🐟Touching fish🐟🐟🐟

Kenvix ⭐ kenvix

🐟
🐟🐟🐟Touching fish🐟🐟🐟
View GitHub Profile
@osy
osy / mt7922-rz616-hotspot-settings.md
Created March 3, 2024 20:22
MT7922/RZ616 Windows Hotspot Channel Settings

Windows Hotspot allows you to easily create an AP (Access Point) from your existing Wifi card. Many computers such as the ROG Ally have a variant of the MT7922 chipset which supports Wifi 6E and it can be used to create a high bandwidth P2P connection for game and VR streaming. Unfortunately, Windows does not provide much support for configuration of the AP channel and bandwidth. Fortunately, it is possible to change these from some registry entries. Note that you must reboot for the changes to take place.

The location of the registry key is inside HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Class{4d36e972-e325-11ce-bfc1-08002be10318} and depends on the order the network devices are installed on your computer. For example, it is HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Class{4d36e972-e325-11ce-bfc1-08002be10318}\0001 on the ROG Ally. Look at the data for value DriverDesc to confirm that you are in the right key.

WfdGOOperatingChannel

Sets the preferred channel number. Currently unknown i

@mcpiroman
mcpiroman / build.gradle.kts
Last active February 12, 2023 19:53
Compose for Desktop with Proguard setup
import org.jetbrains.compose.compose
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
buildscript {
dependencies {
classpath("com.guardsquare:proguard-gradle:7.2.1")
}
}
repositories {
@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
@the-spyke
the-spyke / pipewire.md
Last active May 15, 2024 16:41
Enable PipeWire on Ubuntu 22.04

Enable PipeWire on Ubuntu 22.04

This guide is only for original Ubuntu out-of-the-box packages. If you have added a custom PPA like pipewire-debian, you might get into conflicts.

Ubuntu 22.04 has PipeWire partially installed and enabled as it's used by browsers (WebRTC) for recoding the screeen under Wayland. We can enable remaining parts and use PipeWire for audio and Bluetooth instead of PulseAudio.

Starting from WirePlumber version 0.4.8 automatic Bluetooth profile switching (e.g. switching from A2DP to HSP/HFP when an application needs microphone access) is supported. Jammy (22.04) repos provide exactly version 0.4.8. So, we're good.

Based on Debian Wiki, but simplified for Ubuntu 22.04.

@Youngv
Youngv / WSL2.bat
Last active December 15, 2022 13:43
给 WSL2 和 Host 设置静态 IP 地址,每次重启 Host 或 WSL2 后运行
@ECHO OFF
wsl -d Ubuntu-20.04 -u root ip addr del $(ip addr show eth0 ^| grep 'inet\b' ^| awk '{print $2}' ^| head -n 1) dev eth0
wsl -d Ubuntu-20.04 -u root ip addr add 192.168.50.2/24 broadcast 192.168.50.255 dev eth0
wsl -d Ubuntu-20.04 -u root ip route add 0.0.0.0/0 via 192.168.50.1 dev eth0
wsl -d Ubuntu-20.04 -u root echo nameserver 192.168.50.1 ^> /etc/resolv.conf
powershell -c "Get-NetAdapter 'vEthernet (WSL)' | Get-NetIPAddress | Remove-NetIPAddress -Confirm:$False; New-NetIPAddress -IPAddress 192.168.50.1 -PrefixLength 24 -InterfaceAlias 'vEthernet (WSL)'; Get-NetNat | ? Name -Eq WSLNat | Remove-NetNat -Confirm:$False; New-NetNat -Name WSLNat -InternalIPInterfaceAddressPrefix 192.168.50.0/24;"
@alwynallan
alwynallan / Makefile
Last active April 4, 2024 04:42
Hardware PWM Controller for the Raspberry Pi 4 Case Fan
CC = gcc
RM = rm -f
INSTRUMENT_FOR_PROMETHEUS := false
ifeq ($(INSTRUMENT_FOR_PROMETHEUS),true)
CFLAGS = -Wall -DINSTRUMENT_FOR_PROMETHEUS
LIBS = -lbcm2835 -lprom -lpromhttp -lmicrohttpd
else
CFLAGS = -Wall
@kenvix
kenvix / gpg.asc
Created March 6, 2020 15:22
My GPG Public Key. Fingerprint: 3162 6E1E F743 C4A7 B21C 3723 DFF9 DC5B 0FA4 AD7B Main key id: DFF9DC5B0FA4AD7B
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQENBF5iWdEBCADfZef7lzURgaMpXJ3H7erQ9vPvXN3dYBmi/2kO7OPMdGEG4A7V
OgfoLlor/mhncjUc23lC6r15z6po44Fn5L1dV7fz4/lalUKYNi6yoPhjAvBGlO+b
z/LvML7hREYbviqasRr5+5F127jJBkZkAO9axiLHbXpYFcjpfU+XlJdXnnh1pyIr
OYLDCRlCJVMSFx71SscLPyWrvNL+ivbgvigk3sFaf/bHIWubp080xbs+yrssY6Km
zUcCrk95SByMGRpyUV/doQpHzBCLjaBbmjcijwUqBrsqtelTF75Y1dnR5kTRg/rc
Tw5kTrrMPkYJT6onfUu+Gi1OOcaBEYyw8LkNABEBAAG0IUtlbnZpeCBadXJlIDxr
ZW52aXh6dXJlQGxpdmUuY29tPokBVAQTAQgAPhYhBDFibh73Q8Snshw3I9/53FsP
pK17BQJeYlnRAhsDBQkDwdfvBQsJCAcCBhUKCQgLAgQWAgMBAh4BAheAAAoJEN/5
@StevenACoffman
StevenACoffman / Homoglyphs.md
Last active May 20, 2024 04:28
Unicode Look-alikes

Unicode Character Look-Alikes

Original Letter Look-Alike(s)
a а ạ ą ä à á ą
c с ƈ ċ
d ԁ ɗ
e е ẹ ė é è
g ġ
h һ
@sagivo
sagivo / gist:3a4b2f2c7ac6e1b5267c2f1f59ac6c6b
Last active May 20, 2024 15:38
webRTC stun / turn server list
to check if the server works - https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice
stun:
stun.l.google.com:19302,
stun1.l.google.com:19302,
stun2.l.google.com:19302,
stun3.l.google.com:19302,
stun4.l.google.com:19302,
stun.ekiga.net,
stun.ideasip.com,