Skip to content

Instantly share code, notes, and snippets.

View RealNeGate's full-sized avatar

Yasser Arguelles Snape RealNeGate

  • Washington, USA
View GitHub Profile
@mmozeiko
mmozeiko / astar.h
Last active September 30, 2025 02:05
generic A* in C
// generic A* pathfinding
//
// INTERFACE
//
// mandatory macros
#ifndef ASTAR_POS_TYPE
#error ASTAR_POS_TYPE should specify position type
@bnnm
bnnm / lz4.c
Created March 7, 2020 00:14
LZ4 from XNB decompressor
// Decompresses LZ4 found in XNB (just a test tool for vgmstream).
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
/* Decompresses LZ4 from MonoGame. The original C lib has a lot of modes and configs, but
* MonoGame only uses the core 'block' part, which is a fairly simple LZ77 (has one command
* to copy literal and window values, with variable copy lengths).
@billti
billti / arm64-on-Win10.md
Last active January 1, 2026 03:17
ARM64 Linux on Win10

Below are the steps to get an ARM64 version of Ubuntu running in the QEMU emulator on Windows 10.

Install QEMU

Install for Windows from https://qemu.weilnetz.de/w64/ (I used qemu-w64-setup-20181211.exe)

Put C:\Program Files\qemu on your PATH, and run the below to check it's working (which will list out the CPUs the AArch64 emulator can emulate):

qemu-system-aarch64 -M virt -cpu help
/* clang-format off */
/*
ijss : IncredibleJunior SparseSet
sparse set [1] for bookkeeping of dense<->sparse index mapping or
a building block for a simple LIFO index/handle allocator
[1] https://research.swtch.com/sparse
*/
@cellularmitosis
cellularmitosis / README.md
Last active July 30, 2025 10:50
Jason Pepas' Technical Blog
@nbouteme
nbouteme / ss-fs.glsl
Last active October 29, 2024 09:54
Skyward Sword Brush shader. Accurately emulates what's done with TEVs in a shader. Does NOT include the blurring pass.
#version 300 es
precision highp float;
in vec2 UV;
out vec4 out_color;
uniform float ratio, time;
uniform sampler2D texture0;
const float PI_3 = 1.0471975512;
# Version 0: Use slice views to access a matrix like a block matrix.
def blocked_matrix_multiply0(A, B, block_size, panel_size):
m, p, n = A.shape[0], A.shape[1], B.shape[1]
w, h = block_size, panel_size
C = np.zeros((m, n))
for i in range(0, m, w):
for j in range(0, p, h):
row_panel = A[i:i+w, j:j+h]
for k in range(0, n, w):
column_panel = B[j:j+h, k:k+w]
@fnky
fnky / ANSI.md
Last active February 5, 2026 18:22
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
typedef struct intern_t {
intern_t *next;
uint32_t length; // can be narrower if you want to limit internable string length, which is a good idea.
char str[1];
} intern_t;
hashtable_t string_table;
const char *string_intern(const char *str, uint32_t length) {
uint64_t key = string_hash(str, length);
@idbrii
idbrii / botw-cedec2017.md
Last active February 3, 2026 13:56
An inline image version of Matt Walker's translation of CEDEC 2017 talks by Nintendo