Skip to content

Instantly share code, notes, and snippets.

@Guekka
Guekka / dylib.hpp
Last active December 12, 2023 08:32
C++ typesafe wrapper around dylib (Linux)
#pragma once
#include <dlfcn.h>
#include <iostream>
#include <mutex>
#include <stdexcept>
#include <string_view>
#include <utility>
#include <memory>
@Guekka
Guekka / img_to_c_array.py
Created September 25, 2023 12:34
Quick script using Image Magick to convert an image to a C array
import os
import subprocess
from dataclasses import dataclass
from typing import List
PPM_PATH = "temp.ppm"
def to_ppm(png_path: str, resize: str = "") -> str:
if os.path.exists(PPM_PATH):