Joined November 2012

David Morrow

Portland, OR

Posted to Using External Database with Heroku over 1 year ago

no i think it would be the other way around, you would have to have your database open to the outside to let your heroku app reach it.

when i did this it was a clear db mysql add on to heroku.

Posted to Easily Extend Javascript Prototypes over 1 year ago

yeah nice examples, thanks!

Posted to Using External Database with Heroku over 1 year ago

glad you found it useful,

thanks for pointing that out. fixed

nice, thats certainly more elegant than doing it client-side.

Yeah, writing HTML in your JS is less than ideal and should be avoided. I would push for always using javascript templates. But, sometimes you find yourself in this situation.

@realdlee nice, did not know about that method

@n1k0 thanks! have fixed. Love your library, the docs are fantastic!!

@dpashkevich yeah it does simply work, but as i was saying in my example when you have dynamic attributes I find it cleaner, personal preference.

var className = "booya";
$('body').html($('<div>', {class: className}));

or you could add anything you wanted to the reject array like in my example...

["foo", "", nil] - ["", nil]
# => ["foo"]

@sandersch I like you solution as it rejects empty strings and also nil

@mbillard yes equally elegant, thanks!

Posted to Most minimal backbone.js app possible over 1 year ago

anything that supports REST endpoints and JSON format will work just fine. Even if the server-side you are working with does not support full REST, then you can just switch on the _method param that gets posted as an alternative. I personally have mostly use Backbone.js on top of a Rails stack.

Posted to parseInt() can be dangerous over 1 year ago
parseInt("42", 10); 

is correct, if you use JsLint it will point out the omission of the second param of parseInt.

Just yet another reason to parseInt.

Looks interesting, i'll give it a try

Posted to JavaScript in-string variables over 1 year ago

Hey im working on a prototype extension library.
Would you be interested in collaborating on this with me? The above String addition is really cool.

Posted to JavaScript in-string variables over 1 year ago

I like it! I especially like that you extended the String prototype. Otherwise it would just be another template engine.

would be great to make a bookmarklet out of that so that you can test for greyscale as you work.

Posted to Using jQuery $.proxy over 1 year ago

@blackblist My bad, fixed thanks for reading!

right, but the point of the example i posted is that it creates the gemset if it does not exist on the users computer.

thanks for the comment

2,116 Karma
167,104 Total ProTip Views