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
| diff --git a/lib/race_presenter.rb b/lib/race_presenter.rb | |
| index b08d602..eec6be8 100644 | |
| --- a/lib/race_presenter.rb | |
| +++ b/lib/race_presenter.rb | |
| @@ -1,7 +1,7 @@ | |
| module RacePresenterMod | |
| def race_window(match, race_distance, sensor, title) | |
| - window :title => title, :width => 800, :height => 600 do | |
| - background "media/trappedsprints-800.jpg" | |
| + background black |
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
| class Shoes::Square < Shoes::Widget | |
| def initialize | |
| rect 100, 100, 100, 100 | |
| end | |
| end | |
| Shoes.app do | |
| #works | |
| square() | |
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
| class Person | |
| attr_accessor :name | |
| alias :to_s :name | |
| def initialize(name); self.name = name; end | |
| end | |
| Shoes.app do | |
| sheila = Person.new("Sheila") | |
| liz = Person.new("Elizabeth") | |
| steve = Person.new("Steven") |
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 'trollop' | |
| context = opts[:context] | |
| shoulda = '' | |
| $stdin.each_line do |line| | |
| shoulda << ' '+line.gsub(/def test_#{context}_should_(.*)/,'should "\1" do').gsub('_',' ') | |
| 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
| evan@evan-desktop ~/D/mms> sudo gem install cheat | |
| Successfully installed cheat-1.2.1 | |
| 1 gem installed | |
| evan@evan-desktop ~/D/mms> cheat girlfriend | |
| girlfriend: | |
| Cheating on your girlfriend, wife, or significant other is y'know... probably a | |
| very bad idea. | |
| I'm not judgin', just sayin'. | |
| evan@evan-desktop ~/D/mms> |
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
| <div id="footer"> | |
| <ul class="tabs"> | |
| ... | |
| </ul> | |
| <small>Code last changed: <%= Git.open('./').log(1).first.date %> </small></div> | |
| </div> |
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
| >> a,b = <<-SQL, :foo | |
| jkadsf | |
| SQL | |
| => ["jkadsf\n", :foo] | |
| >> a | |
| => "jkadsf\n" | |
| >> b | |
| => :foo |
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
| Shoes.app(:width => 200, :height => 70 * 4 + 40) do | |
| background black | |
| colors = [red, blue, green, yellow] | |
| people = ["steve","ed","nick","tom"] | |
| @next_color = colors.cycle | |
| @next_color.next | |
| @previous_color = colors.cycle | |
| (colors.length - 1).times { @previous_color.next } | |
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
| #!/bin/bash | |
| declare -r PI=3.14159265358979 | |
| if ['id -u' != "0" ]; then | |
| echo "You should be root to run this script." | |
| exit 1 | |
| fi | |
| clear | |
| echo "What is your race distance in meters?" | |
| read -e RACE_DISTANCE | |
| echo "What is your roller diameter in inches?" |
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
| - def self.create_with_dependencies(attrs = nil, &block) | |
| - if(attrs[:pick_up_place] and !attrs[:pick_up_place].is_a?(Place)) | |
| - attrs[:pick_up_place] = Place.create(attrs[:pick_up_place]) | |
| - end | |
| - if(attrs[:drop_off_place] and !attrs[:drop_off_place].is_a?(Place)) | |
| - attrs[:drop_off_place] = Place.create(attrs[:drop_off_place]) | |
| - end | |
| - create_without_dependencies(attrs, &block) | |
| - end | |
| - class_eval do |
OlderNewer