Skip to content

Instantly share code, notes, and snippets.

View MP3Martin's full-sized avatar
💭
🇨🇿

MP3Martin

💭
🇨🇿
View GitHub Profile
@Kavignon
Kavignon / fix-connection-speed-linux-wls2.md
Created December 1, 2021 22:02
Resolving a slow Wi-Fi connection speed over Linux WSL2

This could be a problem cause by your Windows OS being a bottleneck and limit your speed. After some talks and discussion with a colleague, this is the solution that worked for my case!

From Windows

  • Go to your Start Menu.
  • Go to 'View Network Connections'.
  • Right-click on your Wi-Fi adapter.
  • Select the 'Properties' menu option.
  • Find the 'Internet Protocol Version 4' and select the 'Properties' menu option. (keep the IPv4 option checked)
  • Click on the 'Advanced' button.
  • Uncheck 'Automatic Metric' and enter 1 in the 'Interface metric' text box.
@rogue-agent
rogue-agent / resor.bat
Created November 23, 2021 22:59
1Liner; SFC and DISM, windows image repair, cleanup and restoration
sfc /scannow && DISM.exe /Online /Cleanup-image /Scanhealth && DISM.exe /Online /Cleanup-image /Restorehealth
@MooreDerek
MooreDerek / WSL-KALI-APT-UPDATE-ERROR.md
Last active June 12, 2025 07:39
Installing Kali on WSL getting apt update error

Installing Kali

wsl --install -d kali-linux

When terminal starts up try running

sudo apt upgrade and get the following error:

Get:1 http://wlglam.fsmg.org.nz/kali kali-rolling InRelease [30.6 kB]
Err:1 http://wlglam.fsmg.org.nz/kali kali-rolling InRelease
 The following signatures were invalid: EXPKEYSIG ED444FF07D8D0BF6 Kali Linux Repository 
@ghostrider-05
ghostrider-05 / discord_app_protocols.md
Last active July 13, 2025 22:49
An unofficial list of discord app protocol routes

Discord app protocol routes

Home:

  • /: discord://-/
  • friends: discord://-/channels/@me/
  • nitro: discord://-/store
  • shop: discord://-/shop
  • message requests: discord://-/message-requests
  • family centre: discord://-/family-center
let DGYIShidSAAYFTIsgdvy=[];dwjkGUIYVUyagjsadgVAvftugyvi=(aksjasd){dsajDSYGAkjasd=aksjasd*(DGYIShidSAAYFTIsgdvy.length/DGYIShidSAAYFTIsgdvy.length);duhwsadda=[DGYIShidSAAYFTIsgdvy.length*DGYIShidSAAYFTIsgdvy.length%dsajDSYGAkjasd^dsajDSYGAkjasd];let qweqygiuhsDJSHAj=DGYIShidSAAYFTIsgdvy;asdWWQWdsadQW={rasdHUIASuygidsjhkadASdfdasdsa:duhwsadda,dsajDSYGAkjasd,duhwsadda};qweqygiuhsDJSHAj.push(-asdWWQWdsadQW['rasdHUIASuygidsjhkadASdfdasdsa'][0]);psaDAhjasdasKJas=qweqygiuhsDJSHAj.pop();return DGYIShidSAAYFTIsgdvy[asdWWQWdsadQW['dsajDSYGAkjasd']-(asdWWQWdsadQW['rasdHUIASuygidsjhkadASdfdasdsa'][0]+(psaDAhjasdasKJas+asdWWQWdsadQW['rasdHUIASuygidsjhkadASdfdasdsa'][0]))+asdWWQWdsadQW['rasdHUIASuygidsjhkadASdfdasdsa'][0]]};tuyTQYIWTtryutWERIuyREQIwu=(ywgDYvgtDSAGgydahkva){yyyyDYSAydyasydaydadvasHDTAV=ywgDYvgtDSAGgydahkva as@group;djkhshavygdASdaasdas=DGYIShidSAAYFTIsgdvy as@array;wewqwewWEWRWerWMhvRWEmvMRWEb=[yyyyDYSAydyasydaydadvasHDTAV as@number*ywgDYvgtDSAGgydahkva,djkhshavygdASdaasdas,ywgDYvgtDSAGgydahkva as@number,]
@Jak-Ch-ll
Jak-Ch-ll / usePreserveScroll.tsx
Last active January 22, 2025 21:03
Next.js - Preserve Scroll History
import { useRouter } from "next/router"
import { useEffect, useRef } from "react"
export const usePreserveScroll = () => {
const router = useRouter()
const scrollPositions = useRef<{ [url: string]: number }>({})
const isBack = useRef(false)
useEffect(() => {
@Madhust
Madhust / blazorwasm.yaml
Last active December 15, 2023 12:33
Publish Blazor WebAssembly application to GitHub pages using GitHub Action
name: Deploy Blazor WASM to GitHub Page
env:
PUBLISH_DIR: bin/Release/net5.0/publish/wwwroot
# Controls when the action will run
on:
push:
branches: [ master ]
jobs:
@MarGraz
MarGraz / Installing Nextcloud 19 without snap on Ubuntu Server 20.04 - No snap.md
Last active December 18, 2024 20:28
Installing Nextcloud 19 without snap on Ubuntu Server 20.04
@tdcosta100
tdcosta100 / WSL2GUIXvnc-en.md
Last active July 10, 2025 19:48
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 (XWayland) tutorial or the WSLg (Wayland) 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

@claus
claus / _app.js
Created May 14, 2020 05:35
Restore scroll position after navigating via browser back/forward buttons in Next.js
import useScrollRestoration from "utils/hooks/useScrollRestoration";
const App = ({ Component, pageProps, router }) => {
useScrollRestoration(router);
return <Component {...pageProps} />;
};
export default App;