Skip to content

Instantly share code, notes, and snippets.

View DenisBelmondo's full-sized avatar

Belmondo DenisBelmondo

View GitHub Profile
https://github.com/VSCodium/vscodium/issues/1640
@DenisBelmondo
DenisBelmondo / main.c
Created June 11, 2023 22:55
C dynamic array implementation
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
struct ListInfo;
struct List;
typedef void *(*alloc_item_func_t)(struct ListInfo *, struct List *);
typedef void (*free_item_func_t) (struct ListInfo *, struct List *, size_t);
typedef void (*free_data_func_t) (struct ListInfo *, struct List *);
@DenisBelmondo
DenisBelmondo / Transform.cs
Last active March 1, 2023 19:24
Untested transform rotation shit
public struct Transform
{
public Vector3 Right;
public Vector3 Up;
public Vector3 Forward;
public Transform()
{
Right = Vector3.UnitX;
Up = Vector3.UnitY;
@DenisBelmondo
DenisBelmondo / gist:e6423945692e0b15b1421f68faf819c6
Last active February 1, 2023 02:38
Test case for ZScript default and state block syntax highlighting
// observe that the highlighting for state blocks does not break when on top
// of default blocks and vice versa.
class SomeInventory : Inventory
{
default
{
// hopefully, "Inventory" here will be highlighted as "entity.name.class.zscript"
Inventory.PickupMessage "You will never see this message ingame!";
@DenisBelmondo
DenisBelmondo / gist:c018c1c1df7030d083f47b336e58ebff
Created June 9, 2022 17:39
Lua C++ style classes syntax hack
function class(name)
local penis = {
public = function(_, super_name)
return function(body)
print(body)
end
end
}
setmetatable(penis, {
__call = function(body)