Skip to content

Instantly share code, notes, and snippets.

require 'rubygems'
require 'sinatra'
set :port, 80
set :bind, '0.0.0.0'
get "/*" do
host = request.host
path = request.path
@jagwire
jagwire / java-singleton
Created May 7, 2013 13:24
Java singleton pattern
public enum Singleton {
INSTANCE;
private Singleton() { }
}
@jagwire
jagwire / gist:0129d50778c8b4462b68
Created December 11, 2014 15:12
Unity command line script to build WebGL player
//place this script in the Editor folder within Assets.
using UnityEditor;
//to be used on the command line:
//$ Unity -quit -batchmode -executeMethod WebGLBuilder.build
class WebGLBuilder {
static void build() {
string[] scenes = {"Assets/main.unity"};