>ruby -v
ruby 1.9.3p125 (2012-02-16) [i386-mingw32]
> rails -v
Rails 3.2.3
>ruby -v
ruby 1.9.3p125 (2012-02-16) [i386-mingw32]
> rails -v
Rails 3.2.3
| User.all.each { |p| ap p.attributes} |
| # if the resource is not found then forward to backbone's router | |
| app.use (req, res) -> | |
| newUrl = req.protocol + '://' + req.get('Host') + '/#' + req.url | |
| res.redirect newUrl |
| define(["app", | |
| // Libs | |
| "backbone", "validator", | |
| // Modules | |
| // Plugins | |
| "util", "plugins/jquery.cookie" | |
| //"plugins/backbone.layoutmanager" | |
| ], | |
| function (app, Backbone, Validator, Util, Cookie) { |
| Lexer: function(line) { | |
| var lex = { | |
| origLine: line, | |
| line: line, | |
| yytext: null, | |
| token: null, | |
| check: function(tok) { | |
| if(tok == this.token) { | |
| return this.yytext; | |
| } |
| fs = require("fs"); | |
| try { | |
| var config = JSON.parse(""+fs.readFileSync("config.json")); | |
| } catch (ex) { | |
| console.log('got an error: %s', ex); | |
| process.exit(1); | |
| } | |
| console.log(config); |
| var traverse = require('traverse'); | |
| var bla = ["x", "y", "z", "x", "y", "z", "x", "y", "z", "x", "y", "z", "x", "y", "z", "x", "y", "z", "x", "y", "z", "x", "y", "z"]; | |
| var drp = ["a", "b", "c", "a", "b", "c", "a", "b", "c", "a", "b", "c", "a", "b", "c", "a", "b", "c", "a", "b", "c", "a", "b", "c"]; | |
| var foo = [bla, "l", "m", drp, "n", bla, "l", "m", drp, "n", bla, "l", "m", drp, "n", bla, "l", "m", drp, "n", bla, "l", "m", drp, "n"]; |
| function deepTrimAsync(array, cb) { | |
| async.map(array, function(item, callback) { | |
| if(!Array.isArray(item)) { | |
| if(typeof item === 'string') { | |
| item = sanitize(item).trim(); |
| for (var i = profile.readBooks.length - 1; i >= 0; i--) { | |
| profile.readBooks[i] | |
| }; |
| /* this method is async */ | |
| UserSchema.methods.toPublic = function(done) { | |
| if(typeof done !== "function") { | |
| return undefined; | |
| } | |
| // this is a shared object, so beware of concurrency issues | |
| var publicObj = { | |
| _id: this.id, | |
| email: this.email, |