(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.
(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.
| #!/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` |
| <?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)) { |
| // 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); |
| // 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 | |
| // |