Skip to content

Instantly share code, notes, and snippets.

andrew morton drewish

Block or report user

Report or block drewish

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View v3_plan_copier.rb
# This is a script to demonstrate some features of Recurly's V3 API. It shows
# how to use multiple clients for separate sites to copy plan and add-on data
# between them.
require 'bundler/inline'
gemfile do
source 'https://rubygems.org'
gem 'recurly', '3.0.0.beta.6'
gem 'pry'
end
@drewish
drewish / cinder_docs_todo.md
Last active Jan 24, 2016
Cinder Documentation To Do
View cinder_docs_todo.md

Needs documentation

CameraUi

  • Should document the effects of the various mouse button presses
  • Is there a way to limit camera moves?

Geom::Plane

  • Explain what the axes params mean.
@drewish
drewish / polyline_area.cpp
Last active Aug 29, 2015
Area of a cinder::PolyLine2f
View polyline_area.cpp
// 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;
@drewish
drewish / StarterApp.cpp
Created Oct 5, 2014
My Cinder StarterApp
View StarterApp.cpp
#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;
@drewish
drewish / SquarePerspectiveApp.cpp
Last active Oct 21, 2015
SquarePerspectiveApp
View SquarePerspectiveApp.cpp
// 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"
@drewish
drewish / TestMeshApp.cpp
Last active Aug 29, 2015
Simple demo to compare drawing 2D triangles with Cinder's VBO and TriMesh wrappers
View TestMeshApp.cpp
// 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;
@drewish
drewish / TrianglePaintApp.cpp
Created Aug 5, 2014
trying to figure out cinder screenToWorld
View TrianglePaintApp.cpp
#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;
View keybase.md

Keybase proof

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:

View ruby upgrade.md
cd DIRECTORY_WITH_.ruby-version_AND_Gemfile
brew update
brew upgrade ruby-build
rbenv install
gem install bundler
bundle install
@drewish
drewish / binding.gyp
Created Sep 11, 2012
gyp support for exiv2node
View binding.gyp
{
'targets': [
{
'target_name': 'exiv2',
'sources': [
'exiv2node.cc'
],
'xcode_settings': {
'OTHER_CFLAGS': [
'<!@(pkg-config --cflags exiv2)',
You can’t perform that action at this time.