Skip to content

Instantly share code, notes, and snippets.

View mbartlett21's full-sized avatar

mbartlett21

View GitHub Profile
#!/bin/bash
export WSLKERNEL=`uname -a | cut -d " " -f3 | cut -d "-" -f1`
export CHECKOUT_DIR=`linux-msft-wsl-$WSLKERNEL`
git clone https://github.com/microsoft/WSL2-Linux-Kernel.git --depth=1 -b $CHECKOUT_DIR
cd $WSLKERNEL
sudo make -j$(nproc) KCONFIG_CONFIG=Microsoft/config-wsl CONFIG_USB_STORAGE=m CONFIG_USB_UAS=m
sudo make -j$(nproc) KCONFIG_CONFIG=Microsoft/config-wsl CONFIG_USB_STORAGE=m CONFIG_USB_UAS=m modules
sudo make -j$(nproc) KCONFIG_CONFIG=Microsoft/config-wsl CONFIG_USB_STORAGE=m CONFIG_USB_UAS=m modules_install
@Frityet
Frityet / README.md
Last active October 31, 2025 06:50
Installing Lua (and wlua!) + Luarocks on native Windows (not WSL)

Installing Lua (and wlua!) + Luarocks on native Windows (not WSL)

This guide will go through the FULL process of installing Lua + MinGW + Luarocks on native Windows. This guide is for those who want to use Lua on Windows without WSL and want everything to work well. By the way, it would be greatly appreciated if anyone wants to make a script that does all of this.

Windows versions

I am only targeting Windows 10/11 in this tutorial, specifically ucrt. If you are using Windows 10/11, ignore this. If you use a different version, you will probably be using msvcrt, so you can skip the steps where I switch Luarocks to ucrt.

Step 1: MinGW

@mmozeiko
mmozeiko / !README.md
Last active February 16, 2026 21:35
Download MSVC compiler/linker & Windows SDK without installing full Visual Studio

This downloads standalone MSVC compiler, linker & other tools, also headers/libraries from Windows SDK into portable folder, without installing Visual Studio. Has bare minimum components - no UWP/Store/WindowsRT stuff, just files & tools for native desktop app development.

Run py.exe portable-msvc.py and it will download output into msvc folder. By default it will download latest available MSVC & Windows SDK from newest Visual Studio.

You can list available versions with py.exe portable-msvc.py --show-versions and then pass versions you want with --msvc-version and --sdk-version arguments.

To use cl.exe/link.exe first run setup_TARGET.bat - after that PATH/INCLUDE/LIB env variables will be updated to use all the tools as usual. You can also use clang-cl.exe with these includes & libraries.

To use clang-cl.exe without running setup.bat, pass extra /winsysroot msvc argument (msvc is folder name where output is stored).

@Zeinok
Zeinok / wine-breeze-dark-theme.md
Last active February 13, 2026 20:46
Breeze Dark theme for Wine

Made possible with this reddit post.

Install

wine regedit wine-breeze-dark.reg

Uninstall (Reset Wine color scheme)

wine regedit wine-reset-theme.reg

@riverar
riverar / gist:fd6525579d6bbafc6e48
Last active July 10, 2025 22:54
C# structures to implement "Aero Glass" blur on Windows 10
[DllImport("user32.dll")]
internal static extern int SetWindowCompositionAttribute(IntPtr hwnd, ref WindowCompositionAttributeData data);
[StructLayout(LayoutKind.Sequential)]
internal struct WindowCompositionAttributeData
{
public WindowCompositionAttribute Attribute;
public IntPtr Data;
public int SizeOfData;
}