cd DIRECTORY_WITH_.ruby-version_AND_Gemfile
brew update
brew upgrade ruby-build
rbenv install
gem install bundler
bundle install
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
/* | |
* Based off of http://sambro.is-super-awesome.com/2011/03/03/creating-a-proper-buffer-in-a-node-c-addon/ | |
*/ | |
static Local<Object> makeBuffer(char* data, size_t size) { | |
HandleScope scope; | |
// It ends up being kind of a pain to convert a slow buffer into a fast | |
// one since the fast part is implemented in JavaScript. | |
Local<Buffer> slowBuffer = Buffer::New(data, size); | |
// First get the Buffer from global scope... |
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
{ | |
'targets': [ | |
{ | |
'target_name': 'exiv2', | |
'sources': [ | |
'exiv2node.cc' | |
], | |
'xcode_settings': { | |
'OTHER_CFLAGS': [ | |
'<!@(pkg-config --cflags exiv2)', |
I hereby claim:
- I am drewish on github.
- I am drewish (https://keybase.io/drewish) on keybase.
- I have a public key whose fingerprint is 4FFD A235 05DE 31CC E6C5 8F09 EC2E 7937 F120 9926
To claim this, I am signing this object:
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
#include "cinder/app/AppNative.h" | |
#include "cinder/gl/gl.h" | |
#include "cinder/Camera.h" | |
#include "cinder/params/Params.h" | |
using namespace ci; | |
using namespace ci::app; | |
using namespace std; | |
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
// Simple demo to compare drawing 2D triangles with Cinder's VBO and TriMesh wrappers. | |
// https://drewish.com/2014/08/16/comparing-the-trimesh-and-vbomesh-in-cinder/ | |
#include "cinder/app/AppBasic.h" | |
#include "cinder/gl/gl.h" | |
#include "cinder/gl/Vbo.h" | |
#include "cinder/Trimesh.h" | |
#include "cinder/params/Params.h" | |
using namespace ci; |
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
// About this: https://drewish.com/2014/08/23/using-cinder's-cameraortho-and-vbomesh-to-draw-cubes/ | |
// Inspired by: http://onepointperspective.tumblr.com/post/7805032561/the-perspective-of-a-square | |
// Use with Cinder 0.9.x | |
#include "cinder/app/App.h" | |
#include "cinder/app/RendererGl.h" | |
#include "cinder/gl/gl.h" | |
#include "cinder/gl/Vbo.h" | |
#include "cinder/Utilities.h" |
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
#include "cinder/app/AppNative.h" | |
#include "cinder/Camera.h" | |
#include "cinder/gl/gl.h" | |
#include "cinder/gl/Vbo.h" | |
#include "cinder/Utilities.h" | |
using namespace ci; | |
using namespace ci::app; | |
using namespace std; |
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
// Assumes line does not self intersecting | |
// Treats the line as closed (you wanted area right?) | |
// http://www.mathsisfun.com/geometry/area-irregular-polygons.html | |
float area( PolyLine2f line ) { | |
float sum = 0.0; | |
if ( line.size() > 1 ) { | |
PolyLine2f::iterator it; | |
Vec2f prev, curr; | |
for ( it = line.begin(), prev = *it++; it != line.end() ; it++ ) { | |
curr = *it; |
OlderNewer