Skip to content

Instantly share code, notes, and snippets.

import flash.ui.MouseCursorData;
import flash.ui.MouseCursor;
import flash.ui.Mouse;
// Mouse Hiding
// This is ridiculous
cursorData = new MouseCursorData();
var cursorBitmaps:Vector.<BitmapData> = new Vector.<BitmapData>(1, true);
cursorBitmaps[0] = new BitmapData(1, 1, true, 0x000000ff);
cursorData.data = cursorBitmaps;
@kitschpatrol
kitschpatrol / Art&&Code PCL Session Notes
Created October 22, 2011 14:16
Notes from Jeff Kramer's presentation Algorithms for Point Clouds and Other 3D Data at Art&&Code 3D
##PCL
*Algorithms for Point Clouds and Other 3D Data*
[Jeff Kramer](http://artandcode.com/3d/presenters/jeff-kramer)
aka zarvox
[Session Description](http://artandcode.com/3d/workshops/algorithms-for-point-clouds-and-other-3d-data)
October 22, 2011
He's seen the Kinect Fusion paper. He knows more about Fusion than ayone I've talked to thus far.
@kitschpatrol
kitschpatrol / gist:1361157
Created November 12, 2011 21:39
pointer weirdness
// interface
class Skeleton {
public:
Skeleton();
ofPoint head;
ofPoint neck;
ofPoint leftShoulder;
ofPoint leftElbow;
ofPoint leftHand;
@kitschpatrol
kitschpatrol / gist:1823610
Created February 14, 2012 04:45
Recording Video from OpenFrameworks
#include "ofxQtVideoSaver.h"
...
// in your class definition
ofImage recordingImage;
ofxQtVideoSaver saver;
...
@kitschpatrol
kitschpatrol / gist:2207459
Created March 26, 2012 17:46
Adding Tags to the Processing Flickr Uploader
void mousePressed() {
// Upload the current camera frame.
println("Uploading");
// First compress it as a jpeg.
byte[] compressedImage = compressImage(cam);
// Create an ArrayList (which implements Collection) to hold tags
ArrayList tags = new ArrayList();
@kitschpatrol
kitschpatrol / brain_to_osc.pde
Created June 7, 2012 14:24
Rough skeleton code for going from the b
import processing.serial.*;
Serial serial;
// TODO Import OSC library
int packetCount = 0;
void setup() {
// Set up serial connection
println("Find your Arduino in the list below, note its [index]:\n");
println(Serial.list());
@kitschpatrol
kitschpatrol / gist:3207582
Created July 30, 2012 14:58
Google Docs Spreadsheet to CSV
#!/usr/bin/python
# Script to automate downloading CSV files from GoogleDocs
#
# Expects a config file in the same folder called google_docs_to_file.cfg
# with the following format:
#
# [google_credentials]
# email = [email protected]
# password = *********
@kitschpatrol
kitschpatrol / gist:3344046
Created August 13, 2012 20:58
Futil bitmap button
testButton = new BlockButtonBitmap({
bitmap: Assets.moon,
parent: this
});
testButton.addEventListener(BlockButtonEvent.BUTTON_DOWN, onButtonDown);
// Before:
gerome = new LionWidget({name: AppConstants.GEROME_ID, bitmap: Assets.vote_gerome, parent: this});
column = new LionWidget({name: AppConstants.COLUMN_ID, bitmap: Assets.vote_column, parent: this});
hercules = new LionWidget({name: AppConstants.HERCULES_ID, bitmap: Assets.vote_hercules, parent: this});
plate = new LionWidget({name: AppConstants.PLATE_ID, bitmap: Assets.vote_plate, parent: this});
benin = new LionWidget({name: AppConstants.PAIR_ID, bitmap: Assets.vote_benin, parent: this});
sekhmet = new LionWidget({name: AppConstants.SEKHMET_ID, bitmap: Assets.vote_sekhmet, parent: this});
// After:
gerome = new LionWidget({name: AppConstants.GEROME_ID , bitmap: Assets.vote_gerome , parent: this});
@kitschpatrol
kitschpatrol / gist:3796055
Created September 27, 2012 19:45
Futi's BlockInertialScroll
// Create the scroll container
var scrollTest:BlockInertialScroll = new BlockInertialScroll({
backgroundColor: Colors.GRAY,
showBackground: true,
width: 300,
height: 500,
maxSizeBehavior: BlockBase.MAX_SIZE_CLIPS_VIA_MASK,
scrollAxis: BlockInertialScroll.SCROLL_Y,
parent: this
});