(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.
| ### | |
| Silence STDOUT & STDERR streams during tests | |
| Useful for Yeoman to provide a cleaner output | |
| @uses github.com/balderdashy/fixture-stdout | |
| Yeoman Usage: | |
| If your generator logs anything on the 'end' event | |
| you can add an additional event as the very last | |
| thing and trigger Output.unmute() on that event instead. | |
| ``` |
| // === Arrays | |
| var [a, b] = [1, 2]; | |
| console.log(a, b); | |
| //=> 1 2 | |
| // Use from functions, only select from pattern | |
| var foo = () => [1, 2, 3]; |
| git branch -m old_branch new_branch # Rename branch locally | |
| git push origin :old_branch # Delete the old branch | |
| git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote |
But really easy to re-sort because the items aren't really numbered:
1. one| # change this...unless you're in to jsbin issues :) | |
| repo = "remy/jsbin" | |
| require 'cgi' | |
| v = ARGV[0] || "{query}" | |
| url = ""; | |
| text = ""; | |
| if v.to_s =~ /\A[-+]?\d*\.?\d+\z/ || v == "new" | |
| url = "https://github.com/#{repo}/issues/#{v}" | |
| text = "Open #{v}" |
| // | |
| // SVG — hasClass, addClass, removeClass, toggleClass | |
| // Source: | |
| // https://gist.github.com/branneman/8436956 | |
| // Taken and adapted from: | |
| // http://toddmotto.com/hacking-svg-traversing-with-ease-addclass-removeclass-toggleclass-functions/ | |
| // | |
| if (SVGElement && SVGElement.prototype) { |
| // this is the background code... | |
| // listen for our browerAction to be clicked | |
| chrome.browserAction.onClicked.addListener(function (tab) { | |
| // for the current tab, inject the "inject.js" file & execute it | |
| chrome.tabs.executeScript(tab.ib, { | |
| file: 'inject.js' | |
| }); | |
| }); |
| <?php | |
| use Aws\Common\Aws; | |
| use Aws\S3\Exception\S3Exception; | |
| // make sure the SDK is installed | |
| // I've used Composer to autoload it: http://docs.aws.amazon.com/aws-sdk-php/guide/latest/installation.html | |
| /* | |
| * jQuery File Upload Plugin PHP Class 7.1.0 | |
| * https://github.com/blueimp/jQuery-File-Upload |