Skip to content

Instantly share code, notes, and snippets.

View thomastraum's full-sized avatar
💭
Still on it

Thomas Traum thomastraum

💭
Still on it
View GitHub Profile
@thomastraum
thomastraum / find.sh
Created October 31, 2012 17:20
how to use find
find ~ -name \*.sublime-build
@thomastraum
thomastraum / simplehttp.py
Created November 6, 2012 23:07
python simple http
python -m SimpleHTTPServer
@thomastraum
thomastraum / testApp.cpp
Created December 17, 2012 01:16
Plane Line Intersection
#include "testApp.h"
//--------------------------------------------------------------
void testApp::setup(){
//------------------------------------------------------ 3D
cam.rotate(-90, ofVec3f(1,0,0));
// cam.setTarget(cam_target);
// cam.setDistance(ofGetHeight());
@thomastraum
thomastraum / main.h
Created January 7, 2013 13:43
magic antialiasing
window.setGlutDisplayString("rgba double samples>=4 depth");
@thomastraum
thomastraum / openframeworks.sublime-build
Created January 14, 2013 15:00
openframeworks.sublime-build
{
"cmd": ["xcodebuild"],
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${project_path:${folder}}",
"selector": "source.c, source.c++",
"variants":
[
{
"name": "Run",
@thomastraum
thomastraum / vector loop
Created January 20, 2013 16:53
vector loop
vector<Particle*>::iterator it = group.begin();
while( it != group.end() ) {
it++;
}
@thomastraum
thomastraum / gist:4636035
Created January 25, 2013 16:56
osc addon headers
../../../addons/ofxOsc/libs
../../../addons/ofxOsc/libs/oscpack
../../../addons/ofxOsc/libs/oscpack/src
../../../addons/ofxOsc/libs/oscpack/src/ip
../../../addons/ofxOsc/libs/oscpack/src/ip/posix
../../../addons/ofxOsc/libs/oscpack/src/ip/win32
../../../addons/ofxOsc/libs/oscpack/src/osc
../../../addons/ofxOsc/src
@thomastraum
thomastraum / log
Created February 16, 2013 06:23
crash
[notice] user lost
[notice] user lost
[notice] user new
[notice] Created character with id: 6
[notice] B-REL
[Finished in 425.0s]
@thomastraum
thomastraum / gist:5137119
Created March 11, 2013 19:49
redis start
==> Caveats
To have launchd start redis at login:
ln -sfv /usr/local/opt/redis/*.plist ~/Library/LaunchAgents
Then to load redis now:
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.redis.plist
Or, if you don't want/need launchctl, you can just run:
redis-server /usr/local/etc/redis.conf
@thomastraum
thomastraum / download_gists.js
Created March 23, 2013 12:26
Gist to download all your gists
var request = require('request')
, path = require('path')
, fs = require('fs')
, url = "https://api.github.com/users/thomastraum/gists"
, savepath = './gists';
request(url, function (error, response, body) {
if (!error && response.statusCode == 200) {