Skip to content

Instantly share code, notes, and snippets.

@dan-oak
dan-oak / build.py
Created September 20, 2022 15:15
amalgamate multiple Python files into a single one
# - imports should only be in the format of "import <module> as <alias>",
# if you do not want an alias, do "import stuff as stuff"
# - imports should only be in the top level scope
import os
import re
curr_dir_path = os.path.dirname(__file__)
main_path = os.path.join(curr_dir_path, "main.py")
@dan-oak
dan-oak / stb_truetype_example.cpp
Created December 13, 2020 12:07
Usage example of stb_truetype.h in C++
#include <iostream>
#include <vector>
#include <string>
#include <fstream>
#include <stb/image_write.hpp>
#include <stb/truetype.hpp>
#include <cmath>
#include <map>
#include <fmt/core.h>