Skip to content

Instantly share code, notes, and snippets.


Robert Bu darkfall

View GitHub Profile
bishboria /
Last active Dec 18, 2020
Springer made a bunch of books available for free, these were the direct links
lichray /
Last active Sep 11, 2015
Access tuple by runtime index
#include <tuple>
#include <type_traits>
template <int Low, int High, int Mid = (Low + High) / 2, typename = void>
struct _visit_at;
template <int Low, int High, int Mid>
struct _visit_at<Low, High, Mid, std::enable_if_t<(Low > High)>>
template <typename... T>
anonymous / gist:de6b81c556b5dc7cdc8b
Created Feb 20, 2015
Kernel panic in latest OS X in 10 lines of C
View gist:de6b81c556b5dc7cdc8b
#include <unistd.h>
#include <mach/mach.h>
#include <mach/mach_vm.h>
#include <mach-o/dyld.h>
main (int argc, char * argv[])
volatile char * library;
const mach_vm_size_t page_size = getpagesize ();

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);
	return mix(rand(fl), rand(fl + 1.0), fc);
staltz /
Last active Jan 19, 2021
The introduction to Reactive Programming you've been missing
ffevotte / foo.cxx
Created Jan 6, 2014
Create a precompiled header with libclang
View foo.cxx
#include "foo.hxx"
int main () {
return 0;
onlytiancai /
Created Jun 30, 2012
# -*- coding:utf-8 -*-
import string
__dict = {}
def load_dict(dict_file='words.dic'):
Oddity0x0 / gist:965399
Created May 10, 2011
How I Load a .ogg into OpenAL Using stb_vorbis
View gist:965399
typedef struct{
ALuint ID;
stb_vorbis* stream;
stb_vorbis_info info;
ALuint buffers[2];
ALuint source;
ALenum format;
You can’t perform that action at this time.