Solved: Webpack error “ERR_STREAM_DESTROYED” with “npm run watch”

When trying to use Laravel’s Mix webpack compiler, I was able to use “npm run dev” just fine, but I ran into the following error every time I tried to run “npm run watch”:

$ npm run development — –watch
@ development c:\wamp\www\***
cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js –progress
–hide-modules –config=node_modules/laravel-mix/setup/webpack.config.js “–watc
10% building 1/1 modules 0 activeevents.js:288
throw er; // Unhandled ‘error’ event
Error [ERR_STREAM_DESTROYED]: Cannot call write after a stream was destroyed

After much frustration, I discovered that this issue was caused by running the npm run watch command in a non-Administrator terminal in Windows 7. Run your terminal as Administrator, and this error will go away. This is apparently the root cause of this error on a variety of Node projects.

Hope this saves somebody out there some time and frustration! The Secret, Overcharging Registrar of

If you’ve ever had the misfortune of buying a domain from the professional domain squatters at, you’ll notice that they send you login details to access your new domain at a shady, unknown registrar called “Annulet”. This is a registrar with no homepage, a clipart logo, and a layout that looks like it’s fresh from 1995. Sound suspicious yet?

Well, that’s because it is. Despite their attempts to make it seem that Annulet is its own distinct registrar, that just so happens to be the default registrar when you purchase a BuyDomains name, the truth is that it’s wholly owned by Namemedia Inc, the same company that controls BuyDomains.

Even better, compare their renewal prices to the going rate of $6.99/year for a .com!


Please send your payment via PayPal Merchant services to account – [email protected]

one-year renewal fee: $51.00

Up to 30 days past expiration, one-year renewal fee: $51.00


Please note, before sending funds please contact [email protected] to verify that your domain is in redemption and still retrievable.
If your domain has gone into redemption the following fee applies.

Redemption fee: $120.00 plus one-year renewal fee $51.00. Total: $171.00

Note: Annulet reserves the right to change or modify its fee at any time for services provided pursuant to this agreement.

So, in conclusion, BuyDomains isn’t satisfied with just taking thousands of dollars for that typo of your company name. They also hope you’re stupid enough to pay them six times the going rate for domain registrations in perpetuity.

Click the “Transfer” button as soon as possible, folks!

[SOLVED]: Kibana 5 not loading / 404ing when reverse-proxying in a subdirectory

I just solved an issue with Kibana 5 that many, many people seem to have experienced while trying to install the log analysis app in a subdirectory.

Because Kibana is insecure by default (something I hate about the otherwise-wonderful products made by Elastic), most sysadmins choose to install it locked to localhost only, and allow access by setting up a reverse-proxy using Apache or Nginx.

While many people reverse-proxy Kibana to the root directory of their server and have no issues, I wanted to put it in a subdirectory, /kibana, because I am running multiple services with web interfaces (like phpMyAdmin, etc) on the same server.

After adding /kibana as the basePath in /etc/kibana/kibana.yml, I added the following code to set up the reverse-proxy:

# Kibana Reverse Proxy
ProxyRequests On
ProxyPreserveHost On

ProxyPass /kibana http://localhost:5601/
ProxyPassReverse /kibana http://localhost:5601/

## Auth
AuthType Basic
AuthName "Kibana"
AuthUserFile /var/www/.htpasswd
Require valid-user

When I did this, I got a JSON output with a 404. Another post I saw suggested adding /app/kibana to the proxy rewrite location, however this yielded the error “Kibana did not load properly. Check the server output for more information.” A check of the web console showed that Kibana was trying to load resources from /kibana/bundles, which were 404ing.

The forums and even StackOverflow were full of people who had this problem, and no solutions. However, I finally found one: the rewriting issues are being caused because of a missing slash after /kibana in my proxy configuration. Change to this, and it all works:

ProxyPass /kibana/ http://localhost:5601/
ProxyPassReverse /kibana/ http://localhost:5601/

For good measure, I also added a redirect:

# Add stupid trailing slash that makes Kibana proxy work
RewriteCond %{REQUEST_URI} ^/kibana$
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1/ [R=301,L]

Hopefully this saved you some time.

Apple patents infrared technology that can be used to block photography or recording

Apple recently filed a patent (9,380,225) that could introduce technology allowing an infrared signal to be deployed that blocks iPhones from taking photos or video, aimed at usage in places like concert arenas and movie theatres.

I’ve commentated frequently about Apple’s positions on security and privacy, and based on their reactions to consumer privacy issues in the past (like the San Bernardino FBI case) they seem to do their best to protect user’s privacy, likely to avoid the press firestorm that would undoubtedly ensue if they appeared to be collaborating with third parties to censor or spy on their users.

The technology behind the patent they filed is interesting, and would certainly be valuable to certain businesses / performing artists – however, the existence of such a technology would certainly raise significant concerns about who could access it, and whether it constitutes censorship. It’s almost guaranteed that hackers would attempt to develop technology to trigger video blocking, and governments would also be likely to pursue this technology as well. These concerns are compounded with the fact that lawsuits would be highly likely, and could rule the use of such technology an invasion of privacy. Plus, iPhone users could simply switch to a competing handset (like Android) that dowsn’t implement this hardware.

It’s important to remember that big companies like Apple file literally thousands of patents, most of which are never used. Apple is a very publicity-smart company, and I believe it’s highly unlikely that they would ever introduce a controversial feature that would alienate their customers to the level that this technology likely would.

[SOLVED] Issues installing mod_cloudflare on CentOS 7

I was re-installing mod_cloudflare on a CentOS 7 webserver when I ran across a very frustrating error.

While the CloudFlare package website at claims that they have RPM binaries available for CentOS 7 (installable with sudo rpm -ivh, installing from their binary generates an HTTPD error referencing the httpd.conf doirective that loads the module:

LoadModule cloudflare_module  /usr/lib64/httpd/modules/

Running journalctl -xe shows the following errors the following errors occurring when httpd is launched:

httpd: Syntax error on line 353 of /etc/httpd/conf/httpd.conf: Syntax error on line 1 of /etc/httpd/conf.d/cloudflare.conf: Cannot load modules/ into server: /etc/httpd/modules/ undefined symbol: ap_log_rerror

The solution – turns out CloudFlare’s binaries aren’t made to work out of the box with CentOS 7. That’s annoying. The solution is to download the source and compile it yourself, which is super easy:

cd /tmp
apxs -a -i -c mod_cloudflare.c

This will automatically compile mod_cloudflare and load it in your httpd.conf. Just make sure any configuration changes you need are registered in /etc/httpd/conf.d/cloudflare.conf!

Solved: Unexpected T_FUNCTION error when migrating WordPress site

When migrating a new WordPress site to a production server I hit the following error, which hadn’t showed up on the development machine:

Parse error: syntax error, unexpected T_FUNCTION in [HOSTING-PATH]/wp-co­­ntent/themes/flat-theme/functions.php on line 54

The theme I was using was Flat Theme, but similar errors seem to have shown up in other themes judging from Internet chatter.

Unexpected T-Function usually means that there’s a syntax error, so I initially tried re-uploading the theme in case a file had been corrupted over FTP, but to no avail.

I later learned the true solution – my theme wasn’t compatible with the older version of PHP (5.2) running on the server, which caused the emergent syntax error. Updating PHP solves the issue here.

SOLVED: Photoshop “The Setup encountered an error(20) during install.”

I ran into Photoshop install error 20 during setup of Adobe Photoshop CS5:

The Setup encountered an error(20) during install. Please restart the machine and try again.

The issue seems to have arisen because I was attempting to install Photoshop from a network drive. Copying the installer to the C drive and re-installing solved the issues completely.

What to look for in a great development laptop

I spend hours every week developing web applications on my laptop while I’m away from the office, and over my last few laptops I’ve found a few features that are pretty much indispensable for anyone looking to buy a laptop for in-depth programming, design, and development work. Here are my top priorities:
  • Screen Size – While 12 inch Chromebooks are fine for causal browsing, efficient design and development demands more screen real estate. A 17-inch screen is the best compromise – big enough to fit several windows, but not too big to make carrying the laptop around inconvenient.
  • Monitor ports – When working on complicated projects, a single laptop screen just isn’t enough. When I bring my laptop home, I’ll often hook up a secondary monitor via the HDMI port. Dedicated graphics cards often provide sufficient options.
  • RAM and Graphics – As a designer / developer I frequently have dozens of resource intensive programs open at once. Photoshop and other design tools alone require a significant amount of RAM, as do virtual machines and other development utilities. The minimum I look for in a laptop is 8GB of RAM and a mid to upper level dedicated graphics card.
  • Hard Drive – While not as important as the other specs, it’s standard to get a laptop with at least a terabyte of storage nowadays. If that isn’t enough, external storage media is portable and cheap.
While many designers swear by their Macbooks, very few developers (with the exception of iOS developers) use them for reasons of compatibility and testing. Windows 8 offers no improved functionality for the majority of developers, so Windows 7 remains the preferred development platform OS.
New consumer features like touchscreens, swiveling screens, etc. don’t offer much value for developers. While more and more consumer dollars are moving into tablets and thin client type laptops, developers will still rely on high-powered traditional laptops for years to come.

What the “FunWebProducts” User Agent means

I got an email through a webform from a user complaining that they couldn’t get one of my web apps to work properly. Due to the fact that they didn’t include any detailed information about the issue, the only interesting part of the message to me was the user agent on the browser they were using:

I see user agent strings on a fairly regular basis, and I was surprised to see the FunWebProducts tag. After some Googling around, I discovered that FunWebProducts is a piece MSIE browser bar adware, common circa 2003 but apparently still around. Apparently, in addition to installing adware, they feel the need to broadcast their presence to the world by modifying the browser’s User Agent.

This could be an interesting way to gauge the spread of different pieces of adware. It’s also a great way to determine how seriously you should take your user’s usability complaints.

How to opt-out of American Express promotional mailings

I’ve gotten kind of used to Amex credit card offers piling up, but when I found three of them in my office this morning – for different variations of my business name, likely bought off of (illegally) scraped Whois lists – it was the end of the line. Here’s how to easily opt-out of American Express promotional mailingsbefore they even hit your recycling bin:

Call the American Express direct support line at 1-877-352-6747. You should be forwarded directly to a representative.

Tell them you would like to opt out of all American Express promotional mailings. They will ask you to conform the name and address the mailings are being sent to. Keep in mind that Amex may have your name – or your business – on their lists several different times from different sources, so read the rep every unique address you can find on an Amex envelope.

Once you read them each address, the representative will move your contact info to a “do-not-promote” list and inform you that it could take 6-8 weeks for mailings already “in the system” to stop arriving. After that, your mailbox will be free and clear.