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.prototype._addWithIdCheck = function(model, options) { | |
var idAttribute = model.idAttribute || this.model.prototype.idAttribute; | |
var modelId = model[idAttribute]; | |
if (this.get(modelId) === undefined) { | |
this._addWithoutIdCheck(model, options); | |
} | |
}; | |
Backbone.Collection.prototype._addWithoutIdCheck = Backbone.Collection.prototype._add; |
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
# Original to_json.rb | |
$ cat ~/.rvm/gems/ruby-1.9.2-p180/gems/activesupport-3.1.0.rc6/lib/active_support/core_ext/object/to_json.rb | |
# Hack to load json gem first so we can overwrite its to_json. | |
begin | |
require 'json' | |
rescue LoadError | |
end | |
# The JSON gem adds a few modules to Ruby core classes containing :to_json definition, overwriting |
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
" http://stackoverflow.com/questions/762515/vim-remap-key-to-toggle-line-numbering | |
" source: http://stackoverflow.com/questions/4387210/vim-how-to-map-two-tasks-under-one-shortcut-key | |
let g:relativenumber = 0 | |
set nonumber | |
set relativenumber | |
function! ToggleRelativeNumber() | |
if g:relativenumber == 0 | |
let g:relativenumber = 1 | |
set number |
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.js on Rails @ #rcne2011 | |
[email protected] | |
http://twitter.com/jayunit | |
Nick Gauthier's presentation from Baltimore.rb | |
https://github.com/ngauthier/backbone-presentation | |
http://ngauthier-backbone.heroku.com/ | |
Rails 3.1 backbone generators |
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
When I create a task "Something you forgot but then did today" | |
And time moves forward 1 day | |
When I am on the tasks page | |
And I complete the task "Something you<Completion Command>" |
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
iStockphoto Support -- Ticket ID: 775845 | |
iStockphoto to me | |
show details 9/17/10 | |
-- | |
Issue/Question: | |
>> This is just a reminder from us at iStockphoto that your iStock credits will be expiring soon. | |
Aren\'t expiring credits illegal in several states? See the Skype class action lawsuit regarding expiring credits. |
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
Where is the work/proposal going on to support debugging compile-to-JS langs in browser? | |
How can we move this forward? | |
I'm specifically interested in CoffeeScript. | |
Coffeescript Issue 558 | |
line number mapping for debug | |
https://github.com/jashkenas/coffee-script/issues/558 |
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
Last login: Sun Aug 15 00:20:04 on console | |
Now using ruby 1.8.6 p383 | |
[~] rvm install maglev-24067 | |
<w> ruby ruby-1.8.7-p248 is not installed. </w> | |
<i> Installing Ruby from source to: /Users/jasonmorrison/.rvm/rubies/ruby-1.8.7-p248 </i> |
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
module Enumerable | |
def recmap(&block) | |
self.map do |item| | |
if item.is_a?(Enumerable) | |
item.recmap(&block) | |
else | |
yield item | |
end | |
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
hoptoad_deploy_environments = %w(staging production) | |
if hoptoad_deploy_environments.include?(@configuration[:environment]) | |
# Notify Hoptoad of deploy | |
run "cd #{release_path} && rake hoptoad:deploy TO=#{@configuration[:environment]} REVISION=#{@configuration[:revision]} REPO=#{@configuration[:repository]}" | |
end |