(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> |
| <?php | |
| /* | |
| Plugin Name: WDS JetPack Popular Posts | |
| Plugin URI: http://www.webdevstudios.com | |
| Description: Query for popular posts by views using JetPack by Automattic. | |
| Version: 1.0 | |
| Author: WebDevStudios | |
| Author URI: http://www.webdevstudios.com | |
| License: GPLv2 | |
| Text Domain: wds-popular-posts |
(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#