Skip to content

Instantly share code, notes, and snippets.

Avatar

Mike Armstrong mikearmstrong001

View GitHub Profile
@mikearmstrong001
mikearmstrong001 / JumpAround.js
Last active Oct 14, 2017
Handling a Camera in a React VR scene
View JumpAround.js
import React from 'react';
import {
AppRegistry,
asset,
StyleSheet,
Pano,
Text,
View,
} from 'react-vr';
View gist:9f5d87ed622119c97cebc6ebd1534bd6
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 / TEMPLATE.glsl
Last active Aug 29, 2015 — forked from glslioadmin/TEMPLATE.glsl
GLSL.io Transition (v1)
View TEMPLATE.glsl
#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) {
View index.html
<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>
View gist:18e9a926476401aa1e1a
// 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;
};
View schemelike.cpp
#include <vector>
#include <string>
#include <map>
#include <exception>
#pragma warning( push )
#pragma warning( disable : 4702 )
namespace sl
{
@mikearmstrong001
mikearmstrong001 / lang.bnfish
Created Nov 5, 2014
Playing with simple grammar to cpp recursive descent
View lang.bnfish
BoolExpression =
Expression "==" Expression
Expression ">=" Expression
Expression "<=" Expression
Expression ">" Expression
Expression "<" Expression
.
IfStatement =
View brickportals.cpp
// brickportals.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <malloc.h>
#include <vector>
#include <map>
#include <set>
class sparebitset