Skip to content

Instantly share code, notes, and snippets.

View atduskgreg's full-sized avatar

Greg Borenstein atduskgreg

View GitHub Profile
@atduskgreg
atduskgreg / gist:57435
Created February 3, 2009 09:23
fragment of a drum definition file for Archaeopteryx
$clock.bpm = 125
$mutation = L{|measure| 0 == (measure - 1) % 2}
$measures = 4
probabilities = {}
# d&b
probabilities[36] = [1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0]
probabilities[37] = [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5]
Kernel::require "serialport"
require 'templarx/templarx'
#params for serial port
port_str = "/dev/tty.usbserial-A3000WS0" # may be different for you
baud_rate = 9600
data_bits = 8
stop_bits = 1
parity = SerialPort::NONE
#profile
.left.column
#date= print_date
#address= current_user.address
.right_column
#email= current_user.email
#bio= h(current_user.bio)
<div id="profile">
<div class="left column">
<div id="date"><%= print_date %></div>
<div id="address"><%= current_user.address %></div>
</div>
<div class="right column">
<div id="email"><%= current_user.email %></div>
<div id="bio"><%= h current_user.bio %></div>
</div>
</div>
describe "My Cool library" do
before do
@cool = Cool.new
end
it "should be full of penguins." do
@cool.get_penguins!
@cool.penguin_count.should == 10
end
$ script/generate rpsec_scaffold MyModel
require 'rack/cache'
use Rack::Cache,
:metastore => 'file:/tmp/rack_meta_dir',
:entitystore => 'file:/tmp/rack_body_dir',
:verbose => true
Sienna Architecture
Street: 411 Southwest 6th Avenue
Portland, or 97204-1602
Phone: (503) 227-5616
http://www.oregonlive.com/business/oregonian/index.ssf?/base/business/1231993504100280.xml&coll=7
Aisle7
http://www.aisle7.net/
215 NW Park Ave # A
Portland, OR 97209
class GitBell < ArduinoSketch
output_pin 12, :as => :motor
serial_begin
def loop
digitalWrite motor, OFF
digitalWrite 13, LOW # dorkboard built-in LED on.
if serial_available
digitalWrite motor, ON
delay 1000
Kernel::require "serialport"
module Bell
extend self
def ring
#params for serial port
port_str = "/dev/tty.usbmodem1d11" # may be different for you
baud_rate = 9600
data_bits = 8