NSHTMLTextDocumentType is Slow

By · Published · apple, cocoa, ios

So I was confronted with an interesting bug this week, and I wanted to share it with everyone so maybe it will save you some time. Put simply, NSAttributedString with NSHTMLTextDocumentType is slow. Dog slow. So obscenely slow that it should probably never, ever be used.

Read More...

Responsive CSS3 Columns with Sass and Bootstrap

By · Published · howto, css, css3, html

Impatient? Scroll to the bottom to download.

So I recently was working on a site and wanted to use CSS3 columns. But I really like how the grid system works in Bootstrap, and wanted to be able to define columns in a similar way (i.e. have different number of columns depending on the screen size). Not finding any pre-cooked versions, I decided to write my own.

Strictly speaking, you don't need Bootstrap for this to work. But I did re-use Bootstrap's grid variables so that it breaks along the same lines that Bootstrap's grid does. It's also worth noting that, natively, the columns will collapse on their own if you specify a width. This method just gives you a bit more control.

Read More...

Installing the Ubiquiti UniFi Controller Software on pfSense 2.2

By · Published · howto, networking, pfsense

Note: I am leaving this here for the reference and posterity, but for a variety of reasons, I no longer recommend doing this. It is a neat hack, but tends to be a bit of a pain to live with as you end up having to troubleshoot or reinstall it every time you update pfSense or Unifi. When you can install it on a Raspberry Pi for less than $50, there's really no need to do this.

I personally have switched to running this on a stock Ubuntu system that runs a few other network services in my house.

This is a short tutorial on how to install the Ubiquiti Networks' UniFi Enterprise Wifi controller software on pfSense 2.2. These directions are derived from these directions for 2.1-RC, but have been updated to work on 2.2.

Note that this is a somewhat advanced tutorial. If you are not comfortable working in a Unix command line or editing system files, this is probably not the best thing you could do. But I'm putting it out here in case it will help others.

Read More...

Design Tweaks and New Content!

By · Published · news, ramblings

So I've tweaked the design of the blog a bit.

  • There's now a header, and all the links that were in the sidebar are now in the header. There were simply too many things being added and it was getting unwieldy having them all in the sidebar.
  • It's now fully responsive on all levels of mobile, tablet included!
  • I've added a new page with a bunch of content I've been collecting on the subject of Interstellar Travel.

UILocalNotifications and time zones

By · Published · apple, cocoa, ios

Here's a tip when dealing with UILocalNotifications.

If you want to schedule a notification for a specific time using fireDate, you need to apply a timeZone to the UILocalNotification object. Otherwise, iOS will intepret this as an absolute, countdown-based date based on GMT.

Read More...


Cutting The Cord

By · Published · ramblings, tv, appletv, sports

"When television is good, nothing — not the theater, not the magazines or newspapers — nothing is better.

"But when television is bad, nothing is worse. I invite each of you to sit down in front of your own television set when your station goes on the air and stay there, for a day, without a book, without a magazine, without a newspaper, without a profit and loss sheet or a rating book to distract you. Keep your eyes glued to that set until the station signs off. I can assure you that what you will observe is a vast wasteland."

In 1961, FCC chairman Newton Minnow gave a famous speech bemoaning the state of television. While at the time he was criticizing "game shows" and "formula comedies about totally unbelievable families," among other things, I would argue that his statements are even more true now than they were in 1961.

I remember when cable TV first came to my family. We were living in Florida in the 1980s, and suddenly we had more choice than just four channels. Although it couldn't have been more than 30 or so channels, there was now choice and and endless stream of things we could watch.

Throughout the 90s, we always had cable through all our moves. When I left for college, we had cable in the dorms. When I moved out, I got cable. When I moved to Huntsville, I got cable. When I bought my first house, I got cable. When we moved in 2012, we moved our cable too. The vast majority of my life, I have had cable.

And today, for the first time since I was a kid in 1980s Florida, I walked away from cable TV. We cut the cord, and went back to just a standard antenna and an Internet connection.

This has been something that has been a long time coming. It's something we first seriously started considering in 2012 when our daughter was born and we stopped watching a lot of TV. But even then, my dissatisfaction with the ever increasing price and decreasing quality of cable TV had been building since the mid 2000s.

So this is why I decided to cut the cord and cancel my cable subscription.

Read More...