A comment on an old StackOverflow answer of mine took me to task for a “partial answer” so I decided to improve it. Both posters wanted to know if a mounted device is a disk image. I wrote a simple routine using the DiskArbitration framework to test this given a file URL.Continue reading
I encountered a question on StackOverflow today about how to add items to the favorites list in the Finder sidebar (which also appears in the standard Open and Save dialogs’ side bars). Though it’s already been answered before (I marked it as a duplicate, pointing to an answer from 2011), it appears the information is a bit outdated and contained no example code. I wrote, tested, and added the code to an updated answer. Not satisfied to stop there, I felt it would be easier to use if I created a simple category on
NSURL so you could tell a valid file URL directly to add itself to either the favorite items or favorite volumes list with one call. It’s compatible back to 10.5.
Heinz (the ketchup people) got in trouble when a QR code on their label directed a man to a hard-core porn site. Apparently the promotional campaign had ended and the associated domain expired. Meh. It would’ve been funnier had the condiment been mayonnaise.
I encountered an article today titled Researchers design placenta-on-a-chip to better understand pregnancy and thought, “What an odd hors d’oeuvre.”
So I received some spam today and thought, “what the hell,” and responded. Note, the number I gave for my “assistant” is the United States FBI’s main contact number. 😉Continue reading
Democracy is two wolves and a lamb voting on what to have for lunch. Liberty is a well-armed lamb contesting the vote.Ben Franklin
Too many Americans forget this distinction. See also “tyranny of the majority.”
I’ve been gone awhile. A lot has happened. A lot continues to happen. I’ll write about it eventually, but for the next little while I’ll work toward getting some of the useful content from my (purposefully shuttered) previous site but in the meantime, I’ll let this post stand as a marker, delineating the break in my over-year-long disappearance from the Web. See you all in a bit. In the meantime, I’ve been back on Twitter for awhile. Stalk me there.
It’s a noun meaning a person who is bigoted. It originated in the 16th century and, back then, it meant specifically a superstitious religious hypocrite.Continue reading
With the arrival of some neat new libraries I can’t talk about yet, I wanted a convenient way to ask a
UIFont instance if it was bold or italic*. Although there’s no direct route as there is with
NSFont on Mac OS, It turns out it’s relatively easy to add this functionality to
UIFont via an Objective-C category.