Skip to content

Instantly share code, notes, and snippets.

View coderofsalvation's full-sized avatar

Coder of Salvation / Leon van Kammen coderofsalvation

View GitHub Profile
@eladg
eladg / Equirectangular-to-Stereographic-Projection-Shader.frag
Last active March 29, 2017 06:42
WebGL: stereoscopic projection transformation (Fragment Shader)
// credits to: https://github.com/notlion/streetview-stereographic
precision mediump float;
uniform sampler2D texture;
uniform float scale, aspect, time;
uniform mat3 transform;
varying vec2 v_texcoord;
@wernsey
wernsey / doc.awk
Last active July 18, 2023 12:29
An Awk script to generate HTML documentation from source code with /* */ style comments
BEGIN {
if(!title) title = "Documentation"
print "<!DOCTYPE html>\n<html>\n<head>\n<title>" title "</title>";
print "<style><!--";
print "body {font-family:Arial, Verdana, Helvetica, sans-serif;margin-left:20px;margin-right:20px;}";
print "h1 {color:#575c91;border:none;padding:5px;}";
print "h2 {color:#575c91;border:none;padding:5px;}";
print "h3 {color:#9191c1;border:none;padding:5px;}";
print "a{padding:2px;border-radius:2px;}";
print "a:link {color: #575c91;}";
@darrenscerri
darrenscerri / Middleware.js
Last active July 11, 2023 02:59
A very minimal Javascript (ES5 & ES6) Middleware Pattern Implementation
var Middleware = function() {};
Middleware.prototype.use = function(fn) {
var self = this;
this.go = (function(stack) {
return function(next) {
stack.call(self, function() {
fn.call(self, next.bind(self));
});
@fcamblor
fcamblor / lodash-3.9.3-appscript.js
Last active November 18, 2020 09:53
Lodash 3.9.3 compat with google appscript
/**
* @license
* lodash 3.9.3 (Custom Build) <https://lodash.com/>
* Build: `lodash modern -o ./lodash.js`
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license <https://lodash.com/license>
*/
;(function() {
@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>