Skip to content

Instantly share code, notes, and snippets.

View laserpilot's full-sized avatar

Blair Neal laserpilot

View GitHub Profile
@laserpilot
laserpilot / MemoryLeakMurder.sh
Created November 28, 2012 06:48
MemoryLeakMurder
#!/bin/sh
#Script to reboot application
#Can be used in conjunction with Lingon or a Cron to run on a periodic basis, e.g. every 2 minutes.
#Version 1.0 written by Daniel Mare from http://hintsforums.macworld.com/showthread.php?p=592991
#Date: 02/08/2010
#Modified by Blair Neal 11_27_2012 http://www.blairneal.com
#Helpful shell scripting additions from Patricio Gonzalez Vivo http://www.patriciogonzalezvivo.com/
MEM_THRESHOLD=6 #INTEGERS ONLY If any process uses more MEM (in percentage of total MEM) than this threshold, the application will be rebooted
#Say you have 8gb of RAM, then a process that is using 2gb or more would be using 25%
@laserpilot
laserpilot / gist:5817851
Created June 19, 2013 20:41
FBO on iPad
//FBO Stuff
ofFbo::Settings settings;
settings.width = 2048;
settings.height = 2048;
settings.internalformat = GL_RGBA;
settings.numSamples = 0;
settings.useDepth = false;
settings.useStencil = false;
fboNew.allocate(settings);
@laserpilot
laserpilot / gist:5817950
Created June 19, 2013 20:55
iPhone Main.mm from crystal eye
#include "testApp.h"
#include "ofMain.h"
int main(){
ofAppiPhoneWindow * iOSWindow = new ofAppiPhoneWindow;
// iOSWindow -> enableAntiAliasing(4); //you can't take screenshots with this enabled
iOSWindow -> enableRetinaSupport();
ofSetupOpenGL(iOSWindow,480,320, OF_FULLSCREEN); // <-------- setup the GL context
ofRunApp(new testApp);
}
@laserpilot
laserpilot / gist:7028672
Created October 17, 2013 17:12
KILL THESE PANTONES
1205
1265
142
148
1545
1605
169
196
2622
2706
@laserpilot
laserpilot / gist:b207b793f54f73a6cac4
Created April 19, 2015 21:14
That time Baird, one of the inventors of TV, tried to use a human eyeball as an optic device
-SOURCE: http://www.deadmedia.org/notes/11/119.html
In 1928 Baird convinced a London surgeon to lend him
an eyeball removed from a young man's head. In his own
words...
"As soon as I was given the eye, I hurried in a
@laserpilot
laserpilot / creativetechjobFall2016.txt
Last active September 13, 2016 14:32
Creative Tech Description draft
_______ _______ ___ _ _______ ___ _______ __ __ _______
| || _ || | | || | | | | || | | || |
| ___|| |_| || |_| || ___| | | | _ || |_| || ___|
| |___ | || _|| |___ | | | | | || || |___
| ___|| || |_ | ___| | |___ | |_| || || ___|
| | | _ || _ || |___ | || | | | | |___
|___| |__| |__||___| |_||_______| |_______||_______| |___| |_______|
Send resumes, portfolio and github links to

Keybase proof

I hereby claim:

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

To claim this, I am signing this object: