Discover gists
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
<?php $javascript->link('member_search_form'); ?> | |
<h1>People</h1> | |
<div id="rightcol"> | |
<?php echo $this->element('../users/find_a_member')?> | |
<?php echo $this->element('top_contributors'); ?> | |
</div> | |
<div id="leftcol"> | |
<div class="block"> | |
<div class="top"><div class="right"></div>Search Results</div> |
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
<?php $javascript->link('member_search_form'); ?> | |
<h1>People</h1> | |
<div id="rightcol"> | |
<?php echo $this->element('../users/find_a_member')?> | |
<?php echo $this->element('top_contributors'); ?> | |
</div> | |
<div id="leftcol"> | |
<div class="block"> | |
<div class="top"><div class="right"></div>Search Results</div> |
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
describe SomeController do | |
before(:each) do | |
login as 'user' | |
end | |
... | |
end |
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
begin | |
require 'spec' | |
rescue LoadError | |
require 'rubygems' | |
gem 'rspec' | |
require 'spec' | |
end | |
Spec::Runner.configure do |config| | |
config.mock_with :flexmock |
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
>> "day_threshold".camelize.constantize | |
=> DayThreshold | |
>> "day_threshold".camelize.constantize.new | |
=> #<DayThreshold:0xb7a6cbd0> | |
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
class Metadata < ActiveRecord::Base | |
set_table_name "meta_metadata" | |
belongs_to :meta_object, :polymorphic => true | |
end |
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
require "shorturl" | |
# rubyurl | |
url = ShortURL.shorten( 'http://mypage.com' ) | |
# moourl | |
moo_url = ShortURL.shorten( 'http://mypage.com', :moourl ) |
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
// runtest.io | |
TestSuite clone setPath(System launchPath) run |
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
[kjell@alentour ~/Sites/beaker]> rake | |
(in /Users/kjell/Sites/beaker) | |
/opt/local/bin/ruby -Ilib:test "/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake/rake_test_loader.rb" "test/functional/clients_controller_test.rb" "test/functional/code/commits_controller_test.rb" "test/functional/code/tree_controller_test.rb" "test/functional/deploy/deploys_controller_test.rb" "test/functional/deploy/servers_controller_test.rb" "test/functional/home_controller_test.rb" "test/functional/integrations_controller_test.rb" "test/functional/messages_controller_test.rb" "test/functional/notes/notes_controller_test.rb" "test/functional/notes/versions_controller_test.rb" "test/functional/projects_controller_test.rb" "test/functional/scrum/sprints_controller_test.rb" "test/functional/scrum/stories_controller_test.rb" "test/functional/scrum/story_comments_controller_test.rb" "test/functional/sessions_controller_test.rb" "test/functional/user_assignments_controller_test.rb" "test/functional/users_controller_test.rb" | |
/Users/kje |
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
package jubishop { | |
import mx.collections.ArrayCollection; | |
public class Set extends ArrayCollection { | |
public function removeItem(item:Object):int { | |
var itemIndex:int = getItemIndex(item); | |
if (itemIndex == -1) return -1; | |
removeItemAt(itemIndex); | |
return itemIndex; | |
} |