Skip to content

Instantly share code, notes, and snippets.

View brntbeer's full-sized avatar
:shipit:

Brent Beer brntbeer

:shipit:
View GitHub Profile
require 'benchmark'
def fib(n)
if n == 0 || n == 1
n
else
fib(n-1) + fib(n-2)
end
end
#!/usr/bin/env jruby
require "java"
include_class "processing.core.PApplet"
class Sketch < PApplet
def setup
size( 300, 300, P3D )
no_stroke
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
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
@brntbeer
brntbeer / gist:201246
Last active July 22, 2019 21:17
lol a super old sinatra app that was going to be for pictures of really bad conference or hotel rugs
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/'