This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int fileID = 0; | |
vector<string> fileNames; | |
string fileExtension = "pex"; | |
// | |
ofDirectory dir = ofToDataPath("", true); | |
dir.listDir(); | |
vector<ofFile> files = dir.getFiles(); | |
for(int i=0; i<files.size(); i++) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . -name .svn -print0 | xargs -0 rm -rf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ssh-copy-id clone for osx | |
#used to setup local machine for remote git | |
#derived from http://wiki.dreamhost.com/Git | |
cat ~/.ssh/id_rsa.pub | ssh [email protected] "cat - >> ~/.ssh/authorized_keys" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
du -k * | sort -nr | cut -f2 | xargs -d '\n' du -sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rdate -nc time.apple.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DON'T JUST COPY AND PASTE | |
YOUR USB DRIVE MAY NOT BE /dev/sdd AND THIS WILL ERASE IT | |
$ df -h | |
Filesystem Size Used Avail Use% Mounted on | |
/dev/sda7 7.4G 3.9G 3.2G 56% / | |
none 3.9G 720K 3.9G 1% /dev | |
none 3.9G 704K 3.9G 1% /dev/shm | |
none 3.9G 96K 3.9G 1% /var/run | |
none 3.9G 0 3.9G 0% /var/lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/////SCENARIO 1 | |
//Class 1 | |
Camera camera; | |
sendCamera(camera); | |
//Class 2 | |
Camera* camera; | |
void receiveCamera(Camera &incomingCamera); | |
{ | |
camera = &incomingCamera; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//.cpp | |
#include "testApp.h" | |
//-------------------------------------------------------------- | |
void testApp::setup(){ | |
int circleResolution = 6; | |
circlePolyline.arc(0,0,0,1,1,0,360,circleResolution); | |
circlePoints.resize(circlePolyline.size()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo /usr/sbin/DevToolsSecurity --enable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//from https://github.com/openframeworks/openFrameworks/issues/279 | |
string msg = "some serial message"; | |
unsigned char* msguc = new unsigned char[msg.size()]; | |
memcpy(msguc, msg.c_str(), msg.size()); | |
serialObject.writeBytes(msguc, msg.size()); | |
delete [] msguc; |
OlderNewer