This file contains hidden or 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
require 'benchmark' | |
def fib(n) | |
if n == 0 || n == 1 | |
n | |
else | |
fib(n-1) + fib(n-2) | |
end | |
end |
This file contains hidden or 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
#!/usr/bin/env jruby | |
require "java" | |
include_class "processing.core.PApplet" | |
class Sketch < PApplet | |
def setup | |
size( 300, 300, P3D ) | |
no_stroke |
This file contains hidden or 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
all: main | |
main: Simulator.o Environment.o Behavior.o Cell.o Circle.o Formation.o Neighborhood.o Robot.o Vector.o | |
g++ -framework OpenGL -framework GLUT -framework Cocoa Simulator.o Behavior.o Cell.o Circle.o Environment.o Formation.o Neighborhood.o Robot.o Vector.o -o Simulator | |
Simulator.o: Simulator.cpp | |
g++ -c Simulator.cpp | |
Behavior.o: Behavior.cpp | |
g++ -c Behavior.cpp |
This file contains hidden or 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
all: main | |
main: Simulator.o Environment.o Behavior.o Cell.o Circle.o Formation.o Neighborhood.o Robot.o Vector.o | |
g++ -framework OpenGL -framework GLUT -framework Cocoa Simulator.o Behavior.o Cell.o Circle.o Environment.o Formation.o Neighborhood.o Robot.o Vector.o -o Simulator | |
Simulator.o: Simulator.cpp | |
g++ -c Simulator.cpp | |
Behavior.o: Behavior.cpp | |
g++ -c Behavior.cpp |
This file contains hidden or 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
require 'rubygems' | |
require 'sinatra' | |
require 'dm-core' | |
require 'haml' | |
require 'lib/models' | |
#just covering my bases! | |
['/', '/index/?', '/home/?'].each do |path| | |
get path do | |
redirect '/rugs/' |
NewerOlder