Skip to content

Instantly share code, notes, and snippets.

View kyledecot's full-sized avatar
🤘

Kyle Decot kyledecot

🤘
View GitHub Profile
@take-cheeze
take-cheeze / test.cpp
Created June 21, 2014 06:49
Playing MIDI with fluidsynth on OpenAL.
#include <OpenAL/al.h>
#include <OpenAL/alc.h>
#include <boost/assert.hpp>
#include <cstdint>
#include <cstdlib>
#include <chrono>
#include <iostream>
@kyledecot
kyledecot / each_slice.js
Created May 11, 2012 17:57
jQuery.each_slice inspired by Ruby's each_slice
(function($) {
$.each_slice = function(num, things, iterator) {
var tmp = [];
$.each(things, function(index, thing) {
tmp.push(thing);
if (tmp.length >= num || (index + 1) >= things.length) {
iterator(tmp);
tmp = [];
}
});