Skip to content

Instantly share code, notes, and snippets.

View framkant's full-sized avatar

Filip Wänström framkant

View GitHub Profile
@framkant
framkant / Hotload
Last active August 29, 2015 14:11
Simple example of hot loading on mac
// made by @filipwanstrom
// public domain / as is
// The main.c file
#include <stdio.h>
#include <dlfcn.h>
#include <sys/stat.h>
#include <unistd.h>
typedef void (*printfunc)(void);
@framkant
framkant / makebundle.sh
Last active August 29, 2015 14:11
make a mac os x bundle file structure
#!/bin/sh
# make a basic bundle / folder structure for macosx.
# public domain (by filip wanstrom)
if [ -z "$1" ]; then
echo "usage: `basename $0` <name-of-bundle>"
exit 1
fi
bundleName="$1"
@framkant
framkant / gist:6daed7f6145af958f0bc
Created December 7, 2014 09:55
A C99 version (needed for my own purposes)
// -------------------------------------------------------------------------------
// CoreAudio continuous play test
// (c) 2014 by Arthur Langereis (@zenmumbler)
// created: 2014-12-07
//
// As part of my efforts for stardazed and to create a Mac OS X version of
// Handmade Hero.
//
// compile with:
// clang++ -std=c++11 -stdlib=libc++ -framework AudioToolbox catest.cpp -o catest