I hereby claim:
- I am martijndeh on github.
- I am martijndeh (https://keybase.io/martijndeh) on keybase.
- I have a public key whose fingerprint is B19E 7BB6 30BA DC20 D195 2C20 BEAE 9BAF 1FB1 0E82
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| app.post('/api/forgot-password', function(request, MailWorker, UserModel) { | |
| return UserModel.getMe(request).then(function(user) { | |
| return MailWorker.sendResetPassword(user, user.resetPassword); | |
| }); | |
| }); |
| function MailWorker() { | |
| // | |
| } | |
| app.worker(MailWorker); | |
| MailWorker.prototype.sendResetPasswordMail = function(user, resetPassword) { | |
| var defer = Q.defer(); | |
| mandrill('/messages/send', { | |
| message: { |
| exports = module.exports = Migration; | |
| function Migration() { | |
| // | |
| } | |
| Migration.prototype.up = function() { | |
| this.models.createModel('TodoItem', { | |
| id: [this.UUID, this.CanUpdate(false)], | |
| list: [this.BelongsTo(this.models.TodoList), this.Required], |
| var fire = require('fire'); | |
| var app = fire.app('todomvc'); | |
| app.model(function TodoItem(TodoListModel) { | |
| this.list = [this.BelongsTo(TodoListModel), this.Required]; | |
| this.name = [this.String, this.Required]; | |
| this.completed = [this.Boolean, this.Required, this.Default(false)]; | |
| this.createdAt = [this.DateTime, this.Default('CURRENT_TIMESTAMP')]; | |
| }); |
| app.service(function TextService() { | |
| this.slugify = function(text) { | |
| return text.toString().toLowerCase() | |
| .replace(/\s+/g, '-') | |
| .replace(/[àáâãäå]+/g, 'a') | |
| .replace(/[èéêë]+/g, 'e') | |
| .replace(/[ìíîï]+/g, 'i') | |
| .replace(/[òóôõö]+/g, 'o') | |
| .replace(/[ùúûü]+/g, 'u') | |
| .replace(/\\s+/g, "") |
| app.controller('/', function StartController(TextOfButtonTest, $scope) { | |
| if(TextOfButtonTest.getVariant() == 'A') { | |
| $scope.buttonText = 'Register for FREE'; | |
| } | |
| else { | |
| $scope.buttonText = 'Register now'; | |
| }; | |
| }); |
| app.controller('/', function StartController(TextOfButtonTest, $scope) { | |
| if(TextOfButtonTest.getVariant() == 'A') { | |
| $scope.buttonText = 'Register for FREE'; | |
| } | |
| else { | |
| $scope.buttonText = 'Register now'; | |
| }; | |
| }); |
| app.post('/api/users', function(UserModel, request) { | |
| return UserModel.create(request.body) | |
| .then(function(user) { | |
| return user; | |
| }); | |
| }); |
| app.service(function MyService(fire) { | |
| this.doSomething = function() { | |
| if(fire.isServer()) { | |
| console.log('On the server.'); | |
| } | |
| else if(fire.isClient()) { | |
| console.log('On the client.'); | |
| } | |
| } | |
| }); |