(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.
| // REQUIRES JQUERY AND BACKBONE TO BE LOADED FIRST | |
| // | |
| // With additions by Maciej Adwent http://github.com/Maciek416 | |
| // If token name and value are not supplied, this code Requires jQuery | |
| // | |
| // Adapted from: | |
| // http://www.ngauthier.com/2011/02/backbone-and-rails-forgery-protection.html | |
| // Nick Gauthier @ngauthier | |
| // |
| // some modified async work based on prior by necolas | |
| (function(d){ | |
| var js, | |
| fjs = d.getElementsByTagName('script')[0], | |
| frag = d.createDocumentFragment(), | |
| add = function(url, id) { | |
| if (d.getElementById(id)) {return;} | |
| js = d.createElement('script'); | |
| js.src = url; | |
| id && (js.id = id); |
| <?php | |
| //where you want your thumbnails to go | |
| $thumbs_dir = 'uploads/thumbs/'; | |
| //this should be an array of video paths | |
| $videos = array(); | |
| if( $_POST["name"] ){ | |
| // Grab the MIME type and the data with a regex for convenience | |
| if (!preg_match('/data:([^;]*);base64,(.*)/', $_POST['data'], $matches)) { |
| #!/bin/sh | |
| # Deploy hooks stored in your git repo to everyone! | |
| # https://gist.github.com/apexskier/efb7c1aaa6e77e8127a8 | |
| # | |
| # I keep this in $ROOT/$HOOK_DIR/deploy | |
| # From the top level of your git repo, run ./hook/deploy (or equivalent) after | |
| # cloning or adding a new hook. | |
| # No output is good output. | |
| BASE=`git rev-parse --git-dir` |
(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.
Please consider using http://lygia.xyz instead of copy/pasting this functions. It expand suport for voronoi, voronoise, fbm, noise, worley, noise, derivatives and much more, through simple file dependencies. Take a look to https://github.com/patriciogonzalezvivo/lygia/tree/main/generative
float rand(float n){return fract(sin(n) * 43758.5453123);}
float noise(float p){
float fl = floor(p);
float fc = fract(p);
| copy('<ul>' | |
| + '<li><a download href="' + $("#use_your_own_player input:eq(2)").val() + '">Mobile .MP4 file</a> (480×270)</li>' | |
| + '<li><a download href="' + $("#use_your_own_player input:eq(1)").val() + '">Standard Def .MP4 file</a> (640x360)</li>' | |
| + '<li><a download href="' + $("#use_your_own_player input:eq(0)").val() + '">High Def .MP4 file</a> (1280x720)</li>' | |
| + '</ul>') | |
| http://vimeo.com/99210022/download?t=1403810003&v=265672656&s=f423e5f7722fe0702204e25c76fea728 |
| { | |
| // http://eslint.org/docs/rules/ | |
| "env": { | |
| "browser": true, // browser global variables. | |
| "node": false, // Node.js global variables and Node.js-specific rules. | |
| "worker": false, // web workers global variables. | |
| "amd": false, // defines require() and define() as global variables as per the amd spec. | |
| "mocha": false, // adds all of the Mocha testing global variables. | |
| "jasmine": false, // adds all of the Jasmine testing global variables for version 1.3 and 2.0. |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent