Oct 16 2010
- 04/10/2011 - Updated application.js and application.rb thanks to @rebo's comments
In this article, I will walk through some simple steps to get a [demo app][2] up and running with [Backbone.js][3] and [Sinatra][4] on [Heroku][5].
| (function () { | |
| var perfBar = function(budget) { | |
| window.onload = function() { | |
| window.performance = window.performance || window.mozPerformance || window.msPerformance || window.webkitPerformance || {}; | |
| var timing = window.performance.timing, | |
| now = new Date().getTime(), | |
| output, loadTime; |
| { | |
| "node": true, | |
| "esnext": true, | |
| "curly": true, | |
| "bitwise": true, | |
| "immed": true, | |
| "newcap": true, | |
| "noarg": true, | |
| "undef": true, | |
| "unused": "vars", |
| root = true | |
| [*] | |
| indent_style = tab | |
| end_of_line = lf | |
| charset = utf-8 | |
| trim_trailing_whitespace = true | |
| insert_final_newline = true | |
| [{package.json,*.yml}] |
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
| /** | |
| * Get URL Parameters Using JavaScript | |
| */ | |
| function getQueryParameters(qs) { | |
| qs = qs.replace(/[\[]/, '\\\[').replace(/[\]]/, '\\\]'); | |
| var regexPattern = '[\\?&]' + qs + '=([^&#]*)'; | |
| var regex = new RegExp(regexPattern); | |
| var location = window.location.href; |
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |