This file contains 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
# usage: | |
# field_labeled('Select your address').should have_option("Home Address") | |
Spec::Matchers.define :have_option do |expected| | |
def options_for(select_field) | |
select_field.options.map(&:inner_text) | |
end | |
match do |select_field| | |
raise "Field is not a SelectField" unless select_field.kind_of?(Webrat::SelectField) | |
options_for(select_field).include?(expected) |
This file contains 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
Feature: Get | |
In order to interact with the command line | |
As an end user | |
I want to see and enter things | |
Scenario: | |
Given I will see "Private?" | |
Then I will enter "Yes, sir?" | |
Then I will see "Jump" |
This file contains 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
set keymap vi-insert | |
Control-a: beginning-of-line | |
Control-b: backward-char | |
Control-d: delete-char | |
Control-e: end-of-line | |
Control-f: forward-char | |
Control-k: kill-line | |
Control-n: next-history | |
Control-p: previous-history | |
set keymap emacs-ctlx |
This file contains 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
(ns test.core | |
(:use [overtone.live] | |
[overtone.inst.synth])) | |
(def kick (sample "kick.wav")) | |
(def snare (sample "snare.wav")) | |
(def hit (sample "hit.wav")) | |
(def insts {:kick kick | |
:snare snare | |
:hit hit}) |
This file contains 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
( | |
play{ | |
var n = 5; | |
var fmodrate = Duty.kr(2, 0, Drand([1/16, 1, 1/16, 1/8, 4], inf)); | |
Limiter.ar(GVerb.ar(Pan2.ar( | |
Mix.fill(n, { arg index; | |
SinOsc.ar(440 + (index ** n), SinOsc.ar(440 + (index ** n), 0, Saw.kr(fmodrate, 2.5, 2.5)), 1 / n) | |
}), | |
SinOsc.kr(1) | |
), revtime: SinOsc.kr(1/16, 0, 2, 3) |