Skip to content

Instantly share code, notes, and snippets.

View elamhut's full-sized avatar

Eduardo Lamhut elamhut

View GitHub Profile
@elamhut
elamhut / boids.c
Created January 14, 2026 00:06
Boid Prototype
float vision_cone = 0.35f;
float sep_radius = 15.f;
int neighbor_count = 0;
float separation_weight = 8.5f;
float alignment_weight = 3.f;
float cohesion_weight = 2.f;
float target_weight = 4.f;
float3 separation_sum = {0};
@elamhut
elamhut / gist:21fed18483148eb753eca33bf38a4da7
Last active July 8, 2026 07:21
Ryan Fleury's example code for Fat Structs
typedef struct Entity Entity;
struct Entity
{
// NOTE(rjf): Properties/Generation
u64 properties[(EntityProperty_MAX+63)/64];
u64 generation;
String8 tag;
// NOTE(rjf): Tree Data
Entity *parent;
@elamhut
elamhut / .ideavimrc
Last active May 10, 2026 18:27
My IdeaVim config
" .ideavimrc is a configuration file for IdeaVim plugin. It uses
" the same commands as the original .vimrc configuration.
" You can find a list of commands here: https://jb.gg/h38q75
" Find more examples here: https://jb.gg/share-ideavimrc
" --- Enable IdeaVim plugins https://jb.gg/ideavim-plugins
" Highlight copied text
Plug 'machakann/vim-highlightedyank'
" Commentary plugin
Plug 'tpope/vim-commentary'