Skip to content

Instantly share code, notes, and snippets.

View filharvey's full-sized avatar

Phil Harvey filharvey

View GitHub Profile
@filharvey
filharvey / default.conf
Created June 26, 2019 22:17 — forked from timetocode/default.conf
Nginx config and ubuntu systemd services for hosting multiple game instances on ports 8001 through 8005, proxied from urls like wss://subdomain.domain.io/1 through wss://subdomain.domain.io/5; can also remove the ssl and listen on port 80 instead. The service file is an example, but creating 5 called instance1.service through instance5.service a…
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
listen 443 ssl;
ssl_certificate /srv/certs/fullchain.pem;
ssl_certificate_key /srv/certs/privkey.pem;

Keybase proof

I hereby claim:

  • I am filharvey on github.
  • I am filharvey (https://keybase.io/filharvey) on keybase.
  • I have a public key ASAy_ZTwu7FExm_lsJxgJ7QkxtDdz1t_IQ6qFEMS2N7i4wo

To claim this, I am signing this object:

@filharvey
filharvey / gist:d98bd2b20cd0a2c4403fab0a132000c5
Last active February 4, 2017 23:12
Exports a THREE.js scene mesh to STL, making it suitable for 3d printing
/**
* Based on https://github.com/mrdoob/three.js/blob/a72347515fa34e892f7a9bfa66a34fdc0df55954/examples/js/exporters/STLExporter.js
* extended from https://gist.github.com/kjlubick/fb6ba9c51df63ba0951f
* Tested on r68 and r70
* @author kjlubick / https://github.com/kjlubick
* @author kovacsv / http://kovacsv.hu/
* @author mrdoob / http://mrdoob.com/
*/
THREE.STLExporter = function () {};
'use strict';
var uri = '*';
var PokemonGO = require('./Pokemon-GO-node-api/poke.io.js');
var redis = require('./redis')();
var geo = require('georedis').initialize(redis);
// using var so you can login with multiple users
var a = new PokemonGO.Pokeio();
@filharvey
filharvey / onename
Created August 15, 2014 14:19
onename
Verifying that +filharvey is my Bitcoin username. You can send me #bitcoin here: https://onename.io/filharvey
@filharvey
filharvey / DistanceFieldFont
Last active February 29, 2020 09:35
DistanceFieldFont is an extension for starling and FeathersUI to use Distance Field Fonts instead of normal Bitmap fonts. You can read more on Distance Field Fonts here: http://www.valvesoftware.com/publications/2007/SIGGRAPH2007_AlphaTestedMagnification.pdf https://code.google.com/p/libgdx/wiki/DistanceFieldFonts Currently there is no easy way …
package starling.extensions.DistanceFieldFont
{
import flash.geom.Rectangle;
import flash.utils.Dictionary;
import starling.display.Image;
import starling.text.BitmapChar;
import starling.textures.Texture;
import starling.textures.TextureSmoothing;
import starling.utils.HAlign;