(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| var Slack = require('slack-client'); | |
| exports.foobar = function foobar() { | |
| var token = ''; | |
| var autoReconnect = true; | |
| var autoMark = true; | |
| var slack = new Slack(token, autoReconnect, autoMark); | |
| // controllers/LoginController.js | |
| module.exports = { | |
| index: function(req, res) { | |
| var email = req.param('email'); | |
| var password = req.param('password'); | |
| // delay everthing to prevent bruteforce, dos and timing attacks | |
| setTimeout(function() { |
| <!DOCTYPE html> | |
| <html ng-app='todoApp'> | |
| <head> | |
| <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.14/angular.min.js"></script> | |
| <script src="http://code.jquery.com/jquery.min.js"></script> | |
| <link href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet" type="text/css" /> | |
| <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script> | |
| <title>TO DO List</title> | |
| </head> |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| var gulp = require('gulp'); | |
| var less = require('gulp-less'); | |
| var path = require('path'); | |
| var styl = require('gulp-styl'); | |
| var browserify = require('gulp-browserify'); | |
| var concat = require('gulp-concat'); | |
| var uglify = require('gulp-uglify'); | |
| var rename = require('gulp-rename'); | |
| var refresh = require('gulp-livereload'); | |
| var lr = require('tiny-lr'); |
| /** | |
| * api/models/User.js | |
| * | |
| * The user model contains the instance method for validating the password. | |
| */ | |
| var bcrypt = require('bcrypt'); | |
| function hashPassword(values, next) { | |
| bcrypt.hash(values.password, 10, function(err, hash) { |
#Prerequisites#
npm install passportnpm install passport-localpackage.json)#Steps#
| /* Flatten das boostrap */ | |
| .well, .navbar-inner, .popover, .btn, .tooltip, input, select, textarea, pre, .progress, .modal, .add-on, .alert, .table-bordered, .nav>.active>a, .dropdown-menu, .tooltip-inner, .badge, .label, .img-polaroid { | |
| -moz-box-shadow: none !important; | |
| -webkit-box-shadow: none !important; | |
| box-shadow: none !important; | |
| -webkit-border-radius: 0px !important; | |
| -moz-border-radius: 0px !important; | |
| border-radius: 0px !important; | |
| border-collapse: collapse !important; | |
| background-image: none !important; |