Skip to content

Instantly share code, notes, and snippets.

View mikearmstrong001's full-sized avatar

Mike Armstrong mikearmstrong001

View GitHub Profile
@mikearmstrong001
mikearmstrong001 / brickportals.cpp
Created October 3, 2014 08:07
Random train snippets
// brickportals.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <malloc.h>
#include <vector>
#include <map>
#include <set>
class sparebitset
@mikearmstrong001
mikearmstrong001 / lang.bnfish
Created November 5, 2014 09:35
Playing with simple grammar to cpp recursive descent
BoolExpression =
Expression "==" Expression
Expression ">=" Expression
Expression "<=" Expression
Expression ">" Expression
Expression "<" Expression
.
IfStatement =
#include <vector>
#include <string>
#include <map>
#include <exception>
#pragma warning( push )
#pragma warning( disable : 4702 )
namespace sl
{
// How I'm handling css-layout with ImGui
// Doesn't really scale for windows in windows but this isn't a problem I'm trying to solve
struct LayoutItem
{
const char *text;
ImVec2 p, d;
OnClickedFunc onClicked;
ImIcon icon;
};
@mikearmstrong001
mikearmstrong001 / index.html
Last active August 29, 2015 14:16
split gpx files
<html>
<head>
</head>
<body>
<div>
Choose a GPX file to load<p>
Click on red bar to find location of transition point<p>
Click on add to save point and find others<p>
Use prev, next and zoom options to help<p>
Save option will save the splits to your local download folder<p>
@mikearmstrong001
mikearmstrong001 / TEMPLATE.glsl
Last active August 29, 2015 14:24 — forked from glslioadmin/TEMPLATE.glsl
GLSL.io Transition (v1)
#ifdef GL_ES
precision highp float;
#endif
uniform sampler2D from, to;
uniform float progress;
uniform vec2 resolution;
uniform sampler2D vec;
uniform float speed;
float sat(float a) {
diff --git a/gentest/gentest-javascript.js b/gentest/gentest-javascript.js
index 44b5209..93d547d 100644
--- a/gentest/gentest-javascript.js
+++ b/gentest/gentest-javascript.js
@@ -50,6 +50,13 @@ JavascriptEmitter.prototype = Object.create(Emitter.prototype, {
}},
emitTestEpilogue:{value:function(experiments) {
+ this.push([
+ 'console.log(\'before instanceCount\', Yoga.instanceCount());',
@mikearmstrong001
mikearmstrong001 / JumpAround.js
Last active October 14, 2017 15:47
Handling a Camera in a React VR scene
import React from 'react';
import {
AppRegistry,
asset,
StyleSheet,
Pano,
Text,
View,
} from 'react-vr';