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 / gist:2481323
Created April 24, 2012 16:40
git remote branch
$ git branch -a
* master
origin/HEAD
origin/master
origin/v1.0-stable
origin/experimental
If you just want to take a quick peek at an upstream branch, you can check it out directly:
$ git checkout origin/experimental
But if you want to work on that branch, you'll need to create a local tracking branch:
@thomastraum
thomastraum / testApp.cpp
Created May 21, 2012 22:42 — forked from roxlu/testApp.cpp
Gradient field visualization (partial derivative)
#include "testApp.h"
testApp::testApp() {
}
void testApp::setup(){
ofBackground(22,33,44);
ofSetFrameRate(60);
grad_w = 50;
debugging tip of the day. install growlnotify and then from #openFrameworks do: system("/usr/local/bin/growlnotify -m detected person");
@thomastraum
thomastraum / gist:2781770
Created May 24, 2012 14:09 — forked from miketucker/gist:2775466
Encode some h264 videos, multithreaded boo yah
require 'rubygems'
require 'streamio-ffmpeg'
threads = []
i = 1
Dir.glob('*.avi') do |f|
j = i.to_s
threads.push Thread.new {
begin
@thomastraum
thomastraum / fragment
Created June 4, 2012 01:56
vertex + fragment pointsprites
#version 120
uniform sampler2D texture;
varying vec4 mycol;
void main(void)
{
gl_FragColor = texture2D(texture,gl_PointCoord) * mycol;
}
@thomastraum
thomastraum / coffee compile watch
Created October 6, 2012 12:54
coffee compile watch
coffee -c -wo js coffee
@thomastraum
thomastraum / Start python simple webserver.sh
Created October 6, 2012 21:36
Start python simple webserver
python -m SimpleHTTPServer
@thomastraum
thomastraum / GrassBranch.h
Created October 9, 2012 22:50 — forked from roxlu/GrassBranch.h
GrassBranch
#ifndef APOLLO_GRASSBRANCH
#define APOLLO_GRASSBRANCH
#include <roxlu/Roxlu.h>
#include <vector>
class GrassBranch {
public:
GrassBranch(VerticesPT& vertices);
~GrassBranch();
@thomastraum
thomastraum / ip tables express on port 80
Created October 14, 2012 15:06
ip tables express on port 80
sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to 3000
@thomastraum
thomastraum / find process and kill it.sh
Created October 28, 2012 12:29
find process and kill it
$ ps aux | grep node
you PID 1.5 0.2 44172 8260 pts/2 S 15:25 0:00 node app.js
$ kill -2 PID