Skip to content

Instantly share code, notes, and snippets.

/*
Copyright (c) 2012, Broadcom Europe Ltd
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
@jvcleave
jvcleave / config.linuxarmv6l.default.mk
Created February 21, 2015 06:46
config.linuxarmv6l.default.mk
###############################################################################
# CONFIGURE CORE PLATFORM MAKEFILE
# This file is where we make platform and architecture specific
# configurations. This file can be specified for a generic architecture or can
# be defined as variants. For instance, normally this file will be located in
# a platform specific subpath such as
#
# $(OF_ROOT)/libs/openFrameworksComplied/linux64
#
# This file will then be a generic platform file like:
@jvcleave
jvcleave / Platform.Arm
Last active August 29, 2015 14:16
/ThirdParty/PSCommon/BuildSystem/Platform.Arm
ifeq "$(CFG)" "Release"
# Hardware specifying flags
CFLAGS += -march=armv7-a -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a8
# Optimization level, minus currently buggy optimizing methods (which break bit-exact)
CFLAGS += -O3 -fno-tree-pre -fno-strict-aliasing
# More optimization flags
CFLAGS += -ftree-vectorize -ffast-math -funsafe-math-optimizations #-fsingle-precision-constant
#include "ofShader.h"
#include "ofUtils.h"
#include "ofFileUtils.h"
#include "ofGraphics.h"
#include "ofGLProgrammableRenderer.h"
#include "ofTexture.h"
#include "ofMatrix4x4.h"
#include "ofMatrix3x3.h"
#include "ofVec2f.h"
#include "ofVec3f.h"
@jvcleave
jvcleave / gist:1558681
Created January 4, 2012 05:46
populate ofxSimpleGuiToo ComboBox with files
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++)
@jvcleave
jvcleave / gist:1560848
Created January 4, 2012 16:38
remove .svn files in terminal
find . -name .svn -print0 | xargs -0 rm -rf
@jvcleave
jvcleave / gist:1618951
Created January 16, 2012 03:47
ssh-copy-id clone for osx
#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 username@domain.com "cat - >> ~/.ssh/authorized_keys"
@jvcleave
jvcleave / gist:1686822
Created January 27, 2012 03:31
beaglebone set time
rdate -nc time.apple.com
@jvcleave
jvcleave / gist:1813851
Created February 13, 2012 05:10
beaglebone write image
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
@jvcleave
jvcleave / gist:2984198
Created June 24, 2012 18:02
pointer question
/////SCENARIO 1
//Class 1
Camera camera;
sendCamera(camera);
//Class 2
Camera* camera;
void receiveCamera(Camera &incomingCamera);
{
camera = &incomingCamera;