A few month back, Apple quietly slipped a very nice Objective-C to Javascript bridge into WebKit.
A few month back, Apple quietly slipped a very nice Objective-C to Javascript bridge into WebKit.
Some beautiful lupines I found on the side of a quiet little road in Maine.
I’ve created a widget to display the current status of a Pingdom check on your Status Board.

I’ve created a widget to pull traffic data from the excellent Gauges service by GitHub and display it in your Status Board. If you haven’t heard of Status Board yet, it’s a dashboard for showing all sorts of data on your iPad (or big screen TV) developed by Panic, Inc.
While working on creating the distribution script for packaging the Singly iOS SDK, I ran into a number of issues trying to automatically assign a custom icon to one of the distributed folders. I searched and found a myriad of solutions, but they all suffered from one or more problems:
So after much trial and error, I finally came up with a solution that would address all of the above issues. The following assumes that you already have an ICNS bundle containing your icon at various resolutions.
Step 1 — Create Folder w/Custom Icon
The first thing we need to do is create a temporary folder in Finder and set our ICNS bundle as its icon via Finder’s Inspector:
Step 2 — Extract the Icon Resource
Now that we have a folder with our custom icon set correctly, we will need to extract the resource fork containing our icon. Open the Terminal and execute the following command:
DeRez -only icns path/to/tempfolder/$'Icon\r' > MyIcon.rsrc
This will extract the properly formatted icon resource into a separate file that we will use later. You can now trash the temporary folder we created in step 1.
Step 3 — Apply the Icon Resource
Once we have the extracted resource file, we can apply it to any folder (or file) of our choosing at anytime from the command-line (or a script). This is useful if you need to automate the process of setting a custom icon on a generated folder, such as when you are packaging a new release.
To apply the custom icon to your folder, execute the following in Terminal (or from a script):
Rez -append path/to/MyIcon.rsrc -o path/to/folder/$'Icon\r'
SetFile -a C path/to/folder
That’s it!
Be sure to keep your extracted resource file around so you can use it in the future.
A simple convenience function for adding together an array of numbers.
//
// Iterates over an array of numbers and returns the sum. Example:
//
// _.sum([1, 2, 3]) => 6
//
_.sum = function(obj) {
if (!$.isArray(obj) || obj.length == 0) return 0;
return _.reduce(obj, function(sum, n) {
return sum += n;
});
}
Sushi Sunrise (Taken with Instagram at Uchiko)
Beef Noodle Soup (Taken with instagram)
Crab Cake (Taken with Instagram at The Front Room)
