(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.
| npm install selenium-webdriver | |
| npm install selenium-server-standalone-jar | |
| npm install phantomjs |
(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.
| // Mutative | |
| company.users.push({ name: 'New User' }); | |
| return company; | |
| // Immutable | |
| return { ...company, users: [ ...company.users, { name: 'New User' } ] }; | |
| // Implicit identifier |
| <!doctype html> | |
| <html ng-app="Demo"> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <title> | |
| Preloading Images In AngularJS With Promises | |
| </title> | |
| </head> | |
| <body ng-controller="AppController"> |
| describe("getTweets - Server", function () { | |
| var server, fakeData = [ /* ... */ ]; | |
| before(function () { | |
| // Doesn’t work :( It’s JSONP! | |
| server = sinon.fakeServer.create(); | |
| server.respondWith( | |
| "GET", | |
| "https://api.twitter.com/.../elijahmanor.json?count=5", | |
| [200, { "Content-Type": "application/json" }, JSON.stringify(fakeData)] |
Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.
For the sake of this example, let’s pretend the subfolder containing your site is named dist.
Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).
| #! /usr/bin/python | |
| from sys import argv | |
| from os.path import exists | |
| from os import makedirs | |
| from os import symlink | |
| from os import system | |
| import getopt | |
| # |
| /* | |
| * This work is free. You can redistribute it and/or modify it under the | |
| * terms of the Do What The Fuck You Want To Public License, Version 2, | |
| * as published by Sam Hocevar. See the COPYING file for more details. | |
| */ | |
| /* | |
| * Easing Functions - inspired from http://gizma.com/easing/ | |
| * only considering the t value for the range [0, 1] => [0, 1] | |
| */ | |
| EasingFunctions = { |