Joe Auty

August 26, 2013

This blog consists of geeky computer-related content, as well as posts pertaining to music and jazz in particular. I realize that this makes for a rather odd mix. To make things easier, if you are interested in my music posts and don’t care about the computer stuff, you can find these posts here.

Posted by & filed under AngularJS, LoopbackJS.

While the team does not provide explicit directions for getting their service/NodeJS service to work with Loopback, it isn’t hard to do so. At the top of your top level bootstrap JS file, after the “app” variable is declared simply provide the following:

app.use(require('prerender-node').set('prerenderToken', '<your token here>'));

Then, from the service dashboard, add a URL to your site manually (this URL needs to be world-accessible) and see if it caches the content correctly. Within my AngularJS controller I needed to provide “window.prerenderReady = false;” and “window.prerenderReady = true;” to indicate when all content was loaded, but this quirk may be particular to my setup.

You can also test the prerendering simply by appending “?_escaped_fragment_=” to the end of a URL. It may look different from your live site, but all text content should display.


Posted by & filed under Music.

I’m convinced that one could create some pretty compelling musical products and services in a similar manner to how one would build a tech startup, and that there are practical applications for musicians in thinking this way. Read more »

Posted by & filed under Mac OS X.

I get messages about needing to start a new backup frequently, and because I backup a lot of data this takes forever and is really annoying. I have found the following method for repairing a TM volume:

chflags -R nouchg /Volumes/[yourshare]/[whatever].sparsebundle
hdiutil attach -nomount -noverify -noautofsck /Volumes/[yourshare]/[whatever].sparsebundle
fsck_hfs -drfy /dev/disk3s2

In the sparsebundle file is a plist called “”. Edit it and remove “RecoveryBackupDeclinedDate” and the corresponding date, and change “VerificationState” to 0.


You can also use DiskWarrior on Time Machine volumes from DiskWarrior’s file menu -> “Rebuild Disk Image”.

Posted by & filed under AngularJS, Web Development.

There seems to be a lot of confusion over this, particularly what level of support exists for Javascript content with search bots. It appears that GoogleBot supports some Javascript. Using this NPM module will assist with providing a pre-rendered version of your content for search engine bots. Be sure to test this using the Google Webmaster tools, if you are making API calls to fetch content these IPs/hosts will need to be accessible to the search bots.

Posted by & filed under LoopbackJS, Yeoman.

I had installed my Loopback app using Yeoman some time ago, and was confused by the fact I was missing server/middleware.json, which Strongloop’s documentation indicated I should have. I discovered that installing a blank template app using slc included this file (and presumably other support for middleware), and eventually figured out that my Yeoman Loopback generator was out-of-date. I had some difficulties updating the generator via “yo” (although I didn’t spend much time working on this), but managed to update it by running:

sudo npm install -g generator-loopback

Posted by & filed under LoopbackJS.

I was trying to post to a model in the Loopback Explorer and certain fields referenced IDs from related models, only no matter what format my JSON was in my data was being inserted as an array where each index value corresponded to each letter in the string of text. I discovered that the cause of this was because my relationships weren’t setup correctly. In my case the “model” value in my relationship declaration in my model’s model.json config file wasn’t respecting the proper case sensitivity of the model.

When relationships are correctly established, the model schema displayed in the Explorer will show that the input type is “objectid” rather than simply “object”. With the input type set as “objectid”, you simply have to provide the ID of the related model entry, rather than ObjectId("[id-string]").

Hopefully this makes sense to somebody other than me :)