Skip to content

Instantly share code, notes, and snippets.

View mhintz's full-sized avatar

Mark Hintz mhintz

View GitHub Profile
@mhintz
mhintz / App.h
Last active November 13, 2015 23:17
Posting the OGL tutorials demo framework I'm using (hey Bojan!) - some of this code is my own, some is from the excellent tutorials at ogldev.atspace.co.uk.
#pragma once
#include "GLFWDriver.h"
class App {
public:
App() {};
virtual ~App() {};
int width;
@mhintz
mhintz / simpleflux.js
Created July 20, 2015 13:20
Super Simple Flux Implementation
// The dispatcher has no dependencies. It is a simple event emitter
var dispatcher = {
listeners: [],
emit: function(name, meta) {
this.listeners.forEach(function(listener) {
listener({
name: name,
payload: meta
})
})
@mhintz
mhintz / index.js
Last active January 28, 2016 12:07
unexpected-react test
require('babel-polyfill'); // Necessary for PhantomJS
var unexpected = require('unexpected');
var unexpectedReact = require('unexpected-react');
var React = require('react');
var TestUtils = require('react-addons-test-utils');
var expect = unexpected.clone().use(unexpectedReact);
@mhintz
mhintz / lib.rs
Created March 26, 2016 16:51
unexpected undefined type name errors example
use doesnt_exist::*;
pub fn example_case(something: Option<u32>) {
match something {
Some(x) => { println!("found a number {}", x); },
None => { println!("found nothing"); }
}
}