Skip to content

Instantly share code, notes, and snippets.

View namandixit's full-sized avatar
➡️
Guided by PointeSEGMENTATION FAULT

Naman Dixit namandixit

➡️
Guided by PointeSEGMENTATION FAULT
View GitHub Profile
@namandixit
namandixit / !README.md
Created July 22, 2024 13:03 — forked from mmozeiko/!README.md
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).

@namandixit
namandixit / omg.md
Created March 2, 2023 09:01
Our Machinery Guidebook

The purpose of this guidebook is to lay down principles and guidelines for how to write code and work together at Our Machinery.

OMG-META: About this guidebook

OMG-META-1: Guidelines are identified by unique identifiers

Each guideline in this document is identified by a unique identifier (OMG-META-1) as well as a name (Guidelines are identified by unique identifiers). Names may change, but identifiers are permanent and can be used to permanently and uniquely refer to a specific guideline.

/* NOTE(naman): Description of current Audio system.
--------------------------------------------------------------------
We have two positions inside the audio buffer: play_cursor and
write_cursor. The play_cursor signals what bytes are currently
being played by the audio hardware (well...) while the write_cursor
signals where in the audio buffer is it safe to write new data.
MSDN says that write_cursor is usually ahead of the play_cursor
by about 15 ms. As the audio gets played, both these positions
@namandixit
namandixit / math3d.h
Last active August 17, 2023 11:46
3D Linear Algebra Library in C99 (Tested with OpenGL)
/* This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit