Skip to content

Instantly share code, notes, and snippets.

View jaybaird's full-sized avatar

Jay Baird jaybaird

  • Ferndale, WA
View GitHub Profile
@jaybaird
jaybaird / glm_kazmath.diff
Created June 15, 2016 19:46 — forked from fhssn1/glm_kazmath.diff
Some examples of equivalence of OpenGL math libraries glm (C++) and kazmath (C)
--- p6.cpp 2014-03-28 22:55:37.000000000 -0500
+++ p6.c 2014-03-28 23:02:28.000000000 -0500
@@ -7,9 +7,8 @@
#define PNG_DEBUG 3
#include <png.h>
-#include <glm/glm.hpp>
-#include <glm/gtc/matrix_transform.hpp>
-#include <glm/gtc/type_ptr.hpp>
+#include <kazmath/kazmath.h>
@jaybaird
jaybaird / lua-uuid.lua
Last active October 24, 2015 11:15 — forked from jrus/lua-uuid.lua
local random = math.random
local function uuid()
local template ='xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'
return string.gsub(template, '[xy]', function (c)
local v = (c == 'x') and random(0, 0xf) or random(8, 0xb)
return string.format('%x', v)
end)
end
package my.elasticsearch;
import java.io.File;
import java.io.IOException;
import java.io.RandomAccessFile;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;