Skip to content

Instantly share code, notes, and snippets.

@joannecheng
joannecheng / text_as_blueprint.rb
Created May 19, 2013 16:59
Text as blueprint, ruby-processing style
# Text As Blueprint
# http://www.openprocessing.org/sketch/60986
class TextAsBlueprint < Processing::App
def setup
size 600, 600
@text_typed = "hello world, how are you doing today"
@centerX = width/2
@centerY = height/2
@shapeSpace = loadShape('data/space.svg')
@joannecheng
joannecheng / _.md
Created June 11, 2013 01:33
coloradowildfires
require 'json'
require 'httparty'
require 'sqlite3-ruby'
def get_trips(line)
url = "http://developer.mbta.com/lib/rthr/#{line}.json"
JSON.parse(HTTParty.get(url).body)
end
puts "start"
@joannecheng
joannecheng / create.mkd
Last active December 18, 2015 16:29
Create a new user on linux

adduser [username]

passwd [username]

@joannecheng
joannecheng / _.md
Created June 19, 2013 02:57
Tributary inlet
@joannecheng
joannecheng / _.md
Created June 22, 2013 21:31
Tributary inlet
@joannecheng
joannecheng / rp5-install-notes.md
Last active December 21, 2015 05:18
Ruby-Processing install notes

Hello there! So you want to install Ruby-Processing and get started creating some fun programs.

You can simply type gem install ruby-processing from any installation of Ruby. Ruby-Processing requires JRuby to run, but it comes bundled with its own version of JRuby (granted, a very old version: 1.6.4). To run a sketch using an installed version of JRuby, just run your sketch with the --jruby flag. That way you can use installed gems in your sketches.

The version that lives on rubygems.org is the version of Ruby-Processing I used in my presentation. However, this version of Ruby-Processing is technically outdated: it uses Processing version 1.5.4, whereas the current version of Ruby-Processing is using Processing version 2.0.

There are a few reasons why I used an older version for my talk, and why I recommend people use the older version of Ruby-Processing:

  • It's easier to install: the current Ruby-Processing is too big for rubygems.org, so one needs to pull the repo down from github, install it on
@joannecheng
joannecheng / bouncing_ball.rb
Created August 27, 2013 01:04
eurucamp example
Bouncing Ball
class BouncingBall < Processing::App
def setup
size 650, 800
smooth
stroke_weight 5
@radius = 80
@joannecheng
joannecheng / _.md
Created August 27, 2013 02:47
Tributary inlet
@joannecheng
joannecheng / _.md
Created August 30, 2013 20:29
arches