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
| {% highlight javascript %} | |
| {% include fxmanager.js %} | |
| {% endhighlight %} | |
| <script type="text/javascript" charset="utf-8"> | |
| $(document).ready(function(){ | |
| {% include attributes.js %} | |
| {% include my_ob.js %} | |
| {% include populate.js %} | |
| {% include fxmanager.js %} |
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
| ServiceRequest = Backbone.Model.extend | |
| initialize: (attrs) -> | |
| # Is there a simple way to extract this pseudo-model functionality | |
| # into a superclass? | |
| _.bindAll @, 'set_line_items', | |
| @bind('change', @set_line_items) | |
| @set_line_items() | |
| set_line_items: -> | |
| if(@attributes.line_items and not(@line_items instanceof LineItemList)) |
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
| Backbone.Collection.define_extension 'ordered_by_attribute', (klazz) -> | |
| klazz::comparator = (model) -> (model.get('order') || 99999) |
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
| /* | |
| Dana likes Cody. | |
| Abby does not like Dana. | |
| Dana does not like Abby. | |
| Bess likes Cody or Dana. | |
| Abby likes everyone that Bess likes. | |
| Cody likes everyone who likes her. | |
| Nobody likes herself. | |
| */ |
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
| user=> (first (list 1 2 3)) | |
| 1 | |
| user=> (first {:foo "bar" :baz "buff"}) | |
| [:foo "bar"] | |
| user=> (first [1 2 3]) | |
| 1 | |
| user=> (first (set [3 1 2 3])) | |
| 1 | |
| ;;;; perform a map function (addition) across two types of collections |
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
| $ irb | |
| ree-1.8.7-2011.03-ntest :001 > require 'rubygems' | |
| => true | |
| ree-1.8.7-2011.03-ntest :002 > require 'bundler' | |
| => true | |
| ree-1.8.7-2011.03-ntest :004 > Bundler.require | |
| => [<Bundler::Dependency type=:runtime name="sinatra" requirements=">= 0">, <Bundler::Dependency type=:runtime name="json" requirements=">= 0">, <Bundler::Dependency type=:runtime name="rest-client" requirements=">= 0">, <Bundler::Dependency type=:runtime name="passenger" requirements=">= 0">, <Bundler::Dependency type=:runtime name="capistrano" requirements=">= 0">, <Bundler::Dependency type=:runtime name="capistrano-ext" requirements=">= 0">, <Bundler::Dependency type=:runtime name="jasmine" requirements=">= 0">, <Bundler::Dependency type=:runtime name="rspec" requirements=">= 0">, <Bundler::Dependency type=:runtime name="libnotify" requirements=">= 0">] | |
| ree-1.8.7-2011.03-ntest :005 > require 'jasmine' | |
| Gem::LoadError: Could not find rails (>= 3.0) amongst [bundler-1.0.17, highline-1.6.2, net-ssh-2.1.4, net-scp-1.0.4, net-sftp-2.0.5, net |
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 'spec_helper' | |
| RSpec::Matchers.define :be_included_in do |expected| | |
| match do |actual| | |
| actual.send(:includes?, expected) # => range.includes?("05-15") | |
| end | |
| end | |
| describe PartialDateRange do | |
| describe "a range that wraps the year end from 05-14 to 04-30" do |
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
| ### git branch i'm on defined in parens (branch) ### | |
| ### first part of output truncated for brevity ### | |
| ∵ mkdir git_lesson | |
| ∵ cd git_lesson/ | |
| ∵ touch file_a | |
| ∵ git init | |
| ∵ git add . | |
| ∵ git commit -m "initial" | |
| (master) ∵ echo "a change" >> file_a |
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
| :hello + "world" rescue "say what?" #=> "say what?" | |
| # so we can do the normal thing | |
| :hello.to_s + "world" #=> "hello world" | |
| "#{:hello} world" #=> "hello world" | |
| # or we can have fun | |
| class Symbol |
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
| [jed@test jed]$ git clone blessed:/git/railswiki.git | |
| Initialized empty Git repository in /jed/railswiki/.git/ | |
| remote: Counting objects: 83, done. | |
| remote: error: unable to find f7a0a407db807159e13bf0ed6dcf03480f8abed9 | |
| remote: Compressing objects: 100% (78/78), done. | |
| remote: fatal: unable to read f7a0a407db807159e13bf0ed6dcf03480f8abed9 | |
| error: git upload-pack: git-pack-objects died with error. | |
| fatal: git upload-pack: aborting due to possible repository corruption on the remote side. | |
| remote: aborting due to possible repository corruption on the remote side. |