Skip to content

Instantly share code, notes, and snippets.

View cheako's full-sized avatar

Michael Mestnik cheako

  • Twin Cities Minnesota, USA -- CST
View GitHub Profile
@baryluk
baryluk / mesa-build.py
Last active July 6, 2026 19:36
Build Mesa from git and libdrm git for Debian. amdgpu build 64-bit and 32-bit for Debian stable, testing and unstable, and possibly Ubuntu, Mint, PopOS, etc. No root required. (well sudo to install some build dependencies required tho). Currently a bit borked on Debian stable (requires newer meson).
#!/usr/bin/env python3
# A simple script to build 64-bit and 32-bit Mesa and libdrm on amd64 Debian
# stable, Debian testing, Debian unstable, and possibly some Ubuntu versions
# with some tweaks.
#
# libdrm is build too, because often version right now in Debian sid and experimental
# is too old for current mesa git repo. Also it is nice to build debug
# versions of libdrm when troubleshooting some crashes and bugs.
#
@kchristidis
kchristidis / protobuf-serialization.md
Last active June 27, 2025 14:10
Notes on protocol buffers and deterministic serialization (or lack thereof)

There doesn't seem to be a good resource online describing the issues with protocol buffers and deterministic serialization (or lack thereof). This is a collection of links on the subject.

Protocol Buffers v3.0.0. release notes:

The deterministic serialization is, however, NOT canonical across languages; it is also unstable across different builds with schema changes due to unknown fields.

Maps documentation:

Wire format ordering and map iteration ordering of map values is undefined, so you cannot rely on your map items being in a particular order.

@CodeZombie
CodeZombie / noise.c
Last active September 29, 2018 22:13
procedural noise generator in C.
#include "noise.h"
float generateNoise(float x, float y, int salt) {
x = fabs(x);//this function cannot handle negative coordinates, so fabs (floating abs) is required.
y = fabs(y);//The side effect is that everything is mirrored on the x/y axis :(
//generate x/y coords for each anchor point around the real point
int x1 = (int) floor(x);
int x2 = (int) floor(x) + 1;
int y1 = (int) floor(y);
@zml2008
zml2008 / VkComputeSample.c
Created May 30, 2016 06:10 — forked from sheredom/VkComputeSample
A simple Vulkan compute sample
// 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