Skip to content

Instantly share code, notes, and snippets.

@harold-b
harold-b / slang.odin
Last active November 23, 2024 17:29
Slang partial bindings for Odin
package slang
import "base:intrinsics"
import "base:runtime"
import cffi "core:c"
when ODIN_OS == .Darwin {
@require foreign import libslang {
"./lib/libslang.dylib",
// "./lib/libslang_debug.dylib",
@harold-b
harold-b / sdl3.odin
Last active December 13, 2024 17:31
SDL3 Odin Bindings
package sdl
import "base:intrinsics"
import "base:runtime"
import cffi "core:c"
when ODIN_OS == .Darwin {
SDL_STATIC :: false
@harold-b
harold-b / bgfx.odin
Created May 21, 2024 18:50
Odin bindings for bgfx
package bgfx
import "base:intrinsics"
import "base:runtime"
import cffi "core:c"
when ODIN_OS == .Linux {
@require foreign import bgfx {
"libs/windows/bgfx.a",
}
@harold-b
harold-b / odin.py
Last active December 31, 2024 16:10
Modified version of Laytan's Odin LLDB collection visualizer to support chunked arrays for large dat asets
import lldb
import math
import logging
log = logging.getLogger(__name__)
def is_slice_type(t, internal_dict):
return (t.name.startswith("[]") or t.name.startswith("[dynamic]")) and not t.name.endswith(']')
def slice_summary(value, internal_dict):
@harold-b
harold-b / jni.odin
Last active April 13, 2024 12:54
Simple jni bindings for odin
package jni
import "base:intrinsics"
import "base:runtime"
import cffi "core:c"
when ODIN_OS == .Linux {
foreign import lib {
"system:jni",
}
@harold-b
harold-b / krgpg.cmd
Created August 9, 2022 00:31
Use kr codesign on windows fallback to WSL.
@echo OFF
setlocal enabledelayedexpansion
wsl.exe krgpg %*
@harold-b
harold-b / disable_aer_wrx80_sage.md
Created August 2, 2022 22:34
Disable AER error spam on Asus Pro WS WRX80E-SAGE SE WIFI
### Keybase proof
I hereby claim:
* I am harold-b on github.
* I am hbrenes (https://keybase.io/hbrenes) on keybase.
* I have a public key ASCzbHUfLxq8Is5VtlwA8cOP__7fo7oB9IddgTzAVW743Qo
To claim this, I am signing this object:
@harold-b
harold-b / IntelGfxUbuntu20.04MacBookPro10-1.md
Last active December 6, 2024 01:34
Enable Intel Graphics on Ubuntu 20.04 on MacBook Pro Mid 2012 Retina (10,1)

How to get Intel graphics working on MacBook Pro mid 2012 (10,1) Ubuntu 20.04:

Ubuntu was intalled with the default nvidia drivers that it brought (I believe 3.90)

Clone https://github.com/0xbb/apple_set_os.efi

For details, see the README.md

Build it:

@harold-b
harold-b / HaxeJSObject.hx
Last active June 20, 2017 20:34
Hacky haxe plain javascript object with JS for/in key value loop.
package;
typedef Union2<T1,T2> = haxe.extern.EitherType<T1,T2>;
abstract JSObject( Dynamic ) from Dynamic to Dynamic
{
public inline function new()
{
this = {};
}