Skip to content

Instantly share code, notes, and snippets.

View chromedays's full-sized avatar
🏠
Working from home

chromedays chromedays

🏠
Working from home
View GitHub Profile
@FreyaHolmer
FreyaHolmer / GpuPrinter.cginc
Last active November 1, 2024 23:31
A unity shader .cginc to draw numbers in the fragment shader - see the first comment below for example usage!
///////////////////////////////////////////////////////////////////////////////
// ABOUT: A unity Shader .cginc to draw numbers in the fragment shader
// AUTHOR: Freya Holmér
// LICENSE: Use for whatever, commercial or otherwise!
// Don't hold me liable for issues though
// But pls credit me if it works super well <3
// LIMITATIONS: There's some precision loss beyond 3 decimal places
// CONTRIBUTORS: yes please! if you know a more precise way to get
// decimal digits then pls lemme know!
// GetDecimalSymbolAt() could use some more love/precision
@DennyLindberg
DennyLindberg / make_simple.bat
Last active August 18, 2024 01:26
A much simpler version of make.bat
::::
:: A simplified version of the pseudo-make for building a C application using MSVC.
:: Refer to the other gist for details.
:: https://gist.github.com/DennyLindberg/8c0a5e7471a30e6868a00757e8483b78
::::
@echo off
:::: PROJECT CONFIGURATION
set exe_file=main.exe
@DennyLindberg
DennyLindberg / make.bat
Last active August 18, 2024 02:22
A pseudo-make for building a C application using MSVC
::::
:: A pseudo-make for building a C application using MSVC.
:: https://github.com/DennyLindberg
::
:: Use any text editor and commandline. RemedyBG or RAD Debugger for debugging.
:: https://remedybg.itch.io/remedybg
:: https://github.com/EpicGamesExt/raddebugger
::
:: Example:
:: ./make build run arg1 arg2 arg3
@zhaojunmeng
zhaojunmeng / Setup_Slim.bat
Last active July 11, 2024 12:20
Call Setup.bat in Unreal Engine Source, add multithread, local download cache and exclude list
@REM You can use --dry-run to just print what will be downloaded.
@REM You can use --cache to specify a custom path for the download cache.
@REM call Setup.bat --dry-run --threads=%NUMBER_OF_PROCESSORS% --cache=C:\Code\Cache\ue-gitdeps ^
call Setup.bat --threads=%NUMBER_OF_PROCESSORS% --cache=C:\Code\Cache\ue-gitdeps ^
--exclude=HoloLens ^
--exclude=Linux ^
--exclude=linux-64 ^
--exclude=linux32 ^
--exclude=linux64 ^
// Estimating CPU frequency...
// CPU frequency: 4.52 GHz
// sum1: value = 15182118497126522709, 0.31 secs, 5.14 cycles/elem
// sum2: value = 15182118497126522709, 0.17 secs, 2.93 cycles/elem
#define RW(x) asm("" : "+r"(x))
typedef struct Node {
u64 value;
struct Node *next;
@timlinux
timlinux / README.md
Last active April 10, 2024 19:28
Linux on Lenovo Thinkpad P14s with AMD Processor

Thinkpad P14s AMD Edition Review (Running Fedora)

These are my installation etc. notes for running Linux on my new Thinkpad P14s laptop with 32GB RAM, 1TB SDD and 8 Core, 16 Thread AMD CPU.

Detailed specs

Here is what they quoted as the specs after I confirmed my order:

State of Roblox graphics API across all platforms, with percentage deltas since EOY 2020. Updated December 31 2021.

Windows

API Share
Direct3D 11+ 92% (+3%)
Direct3D 10.1 5% (-2%)
Direct3D 10.0 3% (-0.5%)
@TheSpydog
TheSpydog / sdl2_metal_clearscreen.m
Last active June 6, 2023 12:31
SDL_Metal Clear Screen Example
/* Requires >= SDL 2.0.11 (not yet released)
* Also requires a patch that has not yet been merged:
* https://bugzilla.libsdl.org/show_bug.cgi?id=4796
*/
#include <SDL.h>
#import <Metal/Metal.h>
#import <QuartzCore/CAMetalLayer.h>
int main(int argc, char **argv) {
@Olliebrown
Olliebrown / PortableRPIGitServer.md
Last active October 20, 2024 01:18
Setting up a Portable Git Server on an RPI 3B+

A Portable git Server on an RPI 3B+

For the past three years I participated in the GDC TrainJam, an event where a bunch of crazy game developers get on a train in Chicago and make games in teams with folks they've never met before! There are no winners and losers, only friends and good memories of exotic places during the 52 hour train ride.

Oh, and we also make a few games with very little in the way of outside access. The train has no usable internet and for a large portion of the ride there is also no cellular service. When there is, it is awful and not at all usable for serious things like syncing frequently to an external repo service like GitHub. The first year I played it by ear and got a live repo running on a thumb drive that we handed around between teammates. There were only two programmers on the team and even then we found this to be a real slog! Very tedious and some times merging was a nightmare.

The next year, I endeavored to do better, and have been pretty successful. I decided to s