Skip to content

Instantly share code, notes, and snippets.

@lorinbeer
lorinbeer / gist:3f36fd80af71c61298ef60ba8b7136db
Created August 27, 2019 18:07
preconvert vs in place conversion benchmark
package main
import (
"testing"
)
type myKindaString string
// do nothing ops, no we don't need three
func doSumptin(a string) {}
@lorinbeer
lorinbeer / system setup
Created April 23, 2019 17:45
basic system utilities and services
# install brew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update
# install brew services
brew install elasticsearch
brew install postgresql
brew install redis
brew install zookeeper
@lorinbeer
lorinbeer / run.sh
Last active August 29, 2015 14:13
js timeout script with bash hook
#!/bin/sh
node timeout
@lorinbeer
lorinbeer / gist:ba03627ed48c6f96906e
Created October 24, 2014 05:54
Generate RSA key and certificate pair for dev/staging/fixtures
openssl genrsa 1024 > key.pem
openssl req -x509 -new -key > key-cert.pem
@lorinbeer
lorinbeer / gist:415ade0a792192bd3943
Created October 11, 2014 23:41
zscale adjustment for window coordinates to maintain proper aspect ratio of primitives
var zScale = (innerWidth > innerHeight) ?
zScale = -1. - (size / innerHeight) :
zScale = -1. - (size = innerWidth);
//add actor doesn't have the desired effect unless the tile can be passed as a reference, but there doesn't seem to be a way to do that
void addActor( igsTile tile ) { tile.activateModule( MODULE_ACTOR ); }
igsDungeonMap::igsDungeonMap(int x, int y):
m_iMapID(0),
m_dungeon(),
m_players(),
m_mobs(),
m_items()