Skip to content

Instantly share code, notes, and snippets.

@rsms
rsms / macos-distribution.md
Last active April 21, 2025 04:05
macOS distribution — code signing, notarization, quarantine, distribution vehicles
@mmozeiko
mmozeiko / !README.md
Last active April 20, 2025 05:32
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 - currently v14.40.33807 and v10.0.26100.0.

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).

@mmozeiko
mmozeiko / pcg32.h
Last active March 17, 2025 16:59
simple standalone C headers for PCG random number generator
#pragma once
#include <stdint.h>
// pcg32_next() implementation matches pcg_engines::oneseq_xsh_rr_64_32
// NOTE: use this only for compatibility with 32-bit architectures
// otherwise prefer using pcg64.h implementation with 128-bit state
typedef struct {
@d7samurai
d7samurai / .readme.md
Last active March 19, 2025 22:39
Minimal D3D11

Minimal D3D11

Minimal D3D11 reference implementation: An uncluttered Direct3D 11 setup + basic rendering primer and API familiarizer. Complete, runnable Windows application contained in a single function and laid out in a linear, step-by-step fashion that should be easy to follow from the code alone. ~200 LOC. No modern C++, OOP or (other) obscuring cruft. View on YouTube

hollowcube

Other gists in this series: