The LampStealer app for Hue does not work with newer versions of the bridge, as the API has changed. This shell script works with fewer dependencies and achieves the same. Install jq and run the shell script after pushing the big button on the bridge.
| /* | |
| After purchasing a humble book bundle, go to your download page for that bundle. | |
| Open a console window for the page and paste in the below javascript. | |
| This will download all the books in all the formats available. | |
| */ | |
| $('a').each(function(i){ | |
| if (['MOBI', 'PDF', 'EPUB'].indexOf($.trim($(this).text())) >= 0) { | |
| $('body').append('<iframe id="dl_iframe_'+i+'" style="display:none;">'); | |
| document.getElementById('dl_iframe_'+i).src = $(this).data('web'); | |
| } | 
(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.
This entire guide is based on an old version of Homebrew/Node and no longer applies. It was only ever intended to fix a specific error message which has since been fixed. I've kept it here for historical purposes, but it should no longer be used. Homebrew maintainers have fixed things and the options mentioned don't exist and won't work.
I still believe it is better to manually install npm separately since having a generic package manager maintain another package manager is a bad idea, but the instructions below don't explain how to do that.
Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.
| #!/bin/sh | |
| ### | |
| # SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer) | |
| # For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos | |
| ### | |
| # Alot of these configs have been taken from the various places | |
| # on the web, most from here | |
| # https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx | 
| #!/bin/bash | |
| ## in .bash_profile | |
| SSHAGENT=`which ssh-agent` | |
| SSHAGENTARGS="-s" | |
| if [ -z "$SSH_AUTH_SOCK" -a -x "$SSHAGENT" ]; then | |
| eval `$SSHAGENT $SSHAGENTARGS` | |
| trap "kill $SSH_AGENT_PID" 0 | |
| fi | 
| var Apple, Fruit; | |
| var __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) { | |
| for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } | |
| function ctor() { this.constructor = child; } | |
| ctor.prototype = parent.prototype; | |
| child.prototype = new ctor; | |
| child.__super__ = parent.prototype; | |
| return child; | |
| }; | |
| Fruit = (function() { | 
| /* | |
| * Updated to use the function-based method described in http://www.phpied.com/social-button-bffs/ | |
| * Better handling of scripts without supplied ids. | |
| * | |
| * N.B. Be sure to include Google Analytics's _gaq and Facebook's fbAsyncInit prior to this function. | |
| */ | |
| (function(doc, script) { | |
| var js, | |
| fjs = doc.getElementsByTagName(script)[0], | 
| /* | |
| A simple and elegant function to synchronize multiple functions that expect callback as their last parameter. | |
| example: | |
| sync(func1, [parms], func2, func3, func4, [parms], callback); | |
| Public domain!! | |
| please leave me a comment if you like it! | |
| */ |