Skip to content

Instantly share code, notes, and snippets.

View weigert's full-sized avatar
🤠

Nick McDonald weigert

🤠
View GitHub Profile
@weigert
weigert / font2asciipng.sh
Created February 5, 2023 12:43
Convert Font to ASCII PNG Image / Texture
# font2asciipng.sh
#
# This script uses imagemagick to generate a simple .png
# texture with ascii characters [32-127] from a font.
#
# Author: Nicholas McDonald
# Parameters
FONTNAME="gohufont.otb"
@weigert
weigert / logger.h
Created November 21, 2020 13:11
Simple Templated Recursive Logging Helper
/*===============================================
Logging Helper
Author: Nicholas McDonald
Features:
- Templated Recursive Value Outputs
- Simplified Log File Writing
- Arbitrary Pre-Message Blurbs
@weigert
weigert / timer.h
Last active November 21, 2020 12:09
C++ Timer Header - Benchmarking + Timed Thread Execution
#include <thread>
#include <chrono>
#include <atomic>
namespace timer{
//Benchmarking Helper
template<typename D, typename F, typename... Args>
void benchmark(F function, Args&&... args){
auto start = std::chrono::high_resolution_clock::now();
@weigert
weigert / comsolread.m
Last active June 23, 2020 01:15
MATLAB function for parsing COMSOL ".txt" data export files into an easily useable struct
%{
% COMSOL-MATLAB Parser
%
% Author: Nicholas McDonald
% Tested on COMSOL 5.3 for Linux
%
% This function will parse the COMSOL standard .txt output
% into a struct that is easily used in MATLAB for data vis.
%
% It returns a struct "obj" that handles times, parametric