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
| IOError in Batch entriesController#create | |
| closed stream | |
| RAILS_ROOT: /Library/WebServer/Documents/scope5 | |
| Application Trace | Framework Trace | Full Trace | |
| /Library/WebServer/Documents/scope5/config/initializers/monkeypatch_aws-sdk.rb:6:in `rebuild_request' | |
| /Users/brookr/.rvm/gems/ruby-1.8.7-p352@carbonsalon/gems/aws-sdk-1.7.1/lib/aws/core/client.rb:275:in `rebuild_http_request' | |
| /Users/brookr/.rvm/gems/ruby-1.8.7-p352@carbonsalon/gems/aws-sdk-1.7.1/lib/aws/core/client.rb:265:in `retry_server_errors' | |
| /Users/brookr/.rvm/gems/ruby-1.8.7-p352@carbonsalon/gems/aws-sdk-1.7.1/lib/aws/core/client.rb:226:in `make_sync_request' |
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(username) | |
| possibilities = profiles.keys.select { |u| username.downcase == u.downcase[0, username.length] } | |
| if possibilities.include? username | |
| [username] | |
| else | |
| possibilities | |
| end | |
| 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
| <h1>Listing questions</h1> | |
| <table> | |
| <tr> | |
| <th>Title</th> | |
| <th>Body</th> | |
| <th>Votes</th> | |
| <th>Upvote</th> | |
| <th></th> | |
| <th></th> |
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
| # Assignment: Fill in this Table class so the tests pass! | |
| class Table | |
| end | |
| # Unit tests |
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: # If using naked domain redirects via Google | |
| 216.239.32.21 | |
| 216.239.34.21 | |
| 216.239.36.21 | |
| 216.239.38.21 | |
| MX: # If using Google Mail | |
| 1 ASPMX.L.GOOGLE.COM. | |
| 5 ALT1.ASPMX.L.GOOGLE.COM. | |
| 5 ALT2.ASPMX.L.GOOGLE.COM. |
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 Array | |
| def method_missing(method_name, *args, &block) | |
| if method_name.to_s.is_plural? | |
| map{ |e| e.send(method_name.to_s.singularize) } | |
| else | |
| super | |
| end | |
| end | |
| def respond_to?(method_name, include_private = false) |
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 Array | |
| include ActionView::Helpers::TextHelper | |
| def to_inventory | |
| c = {} | |
| each { |e| c[e.class.name] = c[e.class.name].to_i + 1 } | |
| c.sort.map{ |k, v| pluralize(v, k) }.to_sentence | |
| end | |
| 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
| # From the project root | |
| rvm env -- `rvm current` >> .powenv |
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
| # config.ru for Pow + Wordpress, based on http://stuff-things.net/2011/05/16/legacy-development-with-pow/ | |
| # added hackery to work around wordpress issues - Patrick Anderson (patrick@trinity-ai.com) | |
| # clearly this could be cleaner, but it does work | |
| require 'rack' | |
| require 'rack-legacy' | |
| require 'rack-rewrite' | |
| # patch Php from rack-legacy to substitute the original request so | |
| # WP's redirect_canonical doesn't do an infinite redirect of / |
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
| var Person = function(name) { | |
| this.name = name | |
| } | |
| Person.prototype.getName = function() { return this.name } | |
| var thomas = new Person('Thomas'); | |
| var amy = new Person('Amy'); | |
| thomas.name // --> "Thomas" | |
| Person.prototype.name = "Amy" |