(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.
| // MIXINS | |
| vendor(prop, args) | |
| -webkit-{prop} args | |
| -moz-{prop} args | |
| -o-{prop} args | |
| {prop} args | |
| animation() | |
| vendor('animation', arguments) |
| vendor(prop, args) | |
| -webkit-{prop} args | |
| -moz-{prop} args | |
| -ms-{prop} args | |
| -o-{prop} args | |
| {prop} args | |
| border-radius() | |
| vendor('border-radius', arguments) |
| //following two rotation functions are updated versions of code from: https://github.com/mrdoob/three.js/issues/1219 | |
| //updated to work in latest versions (r52 tested) of THREE.js | |
| // Rotate an object around an axis in object space | |
| var rotationMatrix | |
| function rotateAroundObjectAxis( object, axis, radians ) { | |
| rotationMatrix = new THREE.Matrix4(); | |
| rotationMatrix.makeRotationAxis( axis.normalize(), radians ); | |
| object.matrix.multiplySelf( rotationMatrix ); // post-multiply | |
| object.rotation.setEulerFromRotationMatrix(object.matrix, object.order); |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Building a router</title> | |
| <script> | |
| // Put John's template engine code here... | |
| (function () { | |
| // A hash to store our routes: |
| var BatchStream = require('batch-stream2') | |
| var gulp = require('gulp') | |
| var coffee = require('gulp-coffee') | |
| var uglify = require('gulp-uglify') | |
| var cssmin = require('gulp-minify-css') | |
| var bower = require('gulp-bower-files') | |
| var stylus = require('gulp-stylus') | |
| var livereload = require('gulp-livereload') | |
| var include = require('gulp-include') | |
| var concat = require('gulp-concat') |
| 'use strict'; | |
| // Generated on <%= (new Date).toISOString().split('T')[0] %> using <%= pkg.name %> <%= pkg.version %> | |
| var gulp = require('gulp'); | |
| var open = require('open'); | |
| var wiredep = require('wiredep').stream; | |
| // Load plugins | |
| var $ = require('gulp-load-plugins')(); |
| # A little Meteor CheatSheet about Iron-Router. (updated on a weekly basis) | |
| # Check our Studio: https://gentlenode.com/ | |
| meteor add iron:router | |
| meteor update iron:router | |
| # Iron Router > Configuration |
(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.
| 'use strict'; | |
| /* | |
| Instructions: | |
| 1 - Should execute 'npm run prepare' | |
| before the very first run, it will install and symlink all dependencies. | |
| 2 - Choose between production 'npm start' and development 'npm run start-dev' modes | |
| (watcher will run immediately after initial run). |
| var React = require('react/addons'); | |
| var ReactIgnore = { | |
| displayName: 'ReactIgnore', | |
| shouldComponentUpdate (){ | |
| return false; | |
| }, | |
| render (){ | |
| return React.Children.only(this.props.children); | |
| } |