Enabling SSL on SQUARESPACE by Paulo Fierro

In 2014 Google made an announcement stating they would boost sites using HTTPS encryption in search results. Apart from that there are several other great reasons for using HTTPS. This site is hosted on Squarespace and while you could access this via a squarespace.com subdomain, I prefer using my actual domain that I own and control.

After some searching I came across this excellent blog post describing how to get SSL for your Squarespace site using CloudFlare. Its fairly straightforward to set up and doesn't cost a thing.

Introducing Avoid Town by Paulo Fierro

Today we launched Avoid Town for iPhone, which easily lets you know how busy downtown is going to be on a particular day based on the number of cruise ships and passengers that will be arriving.

Avoid Town was made for people living and working on Grand Cayman where lots of ships also means lots of traffic. Check the app before you leave and you’ll be surprised by how much time you save.

Building the app, shooting and editing the promo and putting everything together for launch has been great fun and we've learned a ton.

Hopefully you'll find the app to be as useful as we do :)

Disabling magnification in WKWebView by Paulo Fierro

On a current project we're using the newly introduced (in iOS 8) and mostly awesome WKWebView to show custom HTML content. Now for some very specific reasons I can't get into, we need to disable the pinch-to-zoom gesture for all the pages that are displayed.

Luckily WKWebView has an allowsMagnification property to do just this, but unfortunately this and the other properties that allow you to modify the magnification are only available on OS X.

But all is not lost, we can attach our own custom Javascript to any page that we load. And with a little help from Javascript we can create a meta tag that disables scaling of the viewport and inject it into the document's <head>.

Once we have this Javascript we can create a WKUserScript object which we tell the WKUserContentController to always inject into loaded pages, and pass that controller to a WKWebViewConfiguration object, which is used when we create our WKWebView.

That sounds like a mouthful but its quite straightforward. Paste code the code below into a UIViewController's viewDidLoad method to try it out.

UPDATE: Initially I had written that we were loading arbitrary content from around the web which wasn't strictly the case and also caused a few people to suggest that this was a bad thing. Absolutely 100% agree. However in this specific case we are loading custom content, produced in-house and requires the gesture to be disabled.

Otherwise you probably should never do this.

And the same thing in Swift for funsies:

Embedding Gists on Squarespace by Paulo Fierro

I'm a big fan of Squarespace and the new platform is very well done. There are however a few things now and then that confuse me and one of these is embedding gists from Github.

I thought you'd use an Embed block for this, but for some reason this doesn't work.

The obvious choice?

The obvious choice?

Huh?

Huh?

Instead you have to scroll down (or search for) the Code block and paste the embed script in there.

The not so obvious choice

The not so obvious choice

Not quite as obvious as I thought, but at least it works.

Below is a random gist I use for converting WAV files to CAF for embedding in iOS apps:

The screenshots were edited in Napkin. Its great, you should try it.

Google Chrome gets fatter and fatter by Paulo Fierro

I ran DaisyDisk the other day to reclaim some lost disk space and found some oddities. One of these was Google Chrome using over 4GB in my Applications folder.

A browser really shouldn't require 4GB of space. So I emptied Chrome's cache, but that didn't affect the overall size at all.

I peeked inside (right-clicking on Chrome and selecting Show Package Contents) and in Contents/Versions I found this:

So many Chromes!

Chrome was storing a backup of itself, presumably every time it did an auto-update. As far as I see tell there is no way to delete these backups from within Chrome or turning off this behaviour.

Deleting all of them but not the newest one didn't seem to make a difference — Chrome works fine and I got some disk space back.

Of course if this crashes your Mac and it bursts into flames that's on you :-)