Skip to content

MacRuby, CocoaPods, 10.7, and XCode 4.3

I have a MacRuby project that uses CocoaPods for many of its ObjC dependencies. I had a bit of trouble getting it to run properly with the latest version of Xcode (4.3). This had to do with a recent change I made to MABSupportFolder (use of isEmpty()) which triggered a fairly obscure bug in addition to the new XCode 4.3 organizational structure not being properly recognized at first. The obscure MacRuby bug was being caused by running -count on an NSString. When using MacRuby if you test if a NSString responds to -count using -respondsToSelector: you’ll get true as the response because of Ruby’s String#count method. However, that method requires an argument, but running respondsToSelector:@selector(count) will return true for an NSString…

Continue Reading

Scripting OmniGraffle: MySQL Visualization & JSON Representations

OmniGraffle is a great tool for visually mapping out complex relationships or hierarchical structures. Often when working in groups where some of the personnel have no programming or mathematical background OmniGraffle is a great tool to bridge the gap. Converting OmniGraffle Hierarchy to JSON Often I’ll use OmniGraffle to map out site structures with non-programmers. The challenge is once everything has been done in OmniGraffle it is normally a manual process to convert the data in OmniGraffle to a structured data representation, like JSON, that is easy to programmatically work with. Or, in my specific case, output the structured OmniGraffle document into a text document that could be reviewed and edited by others on a Google Doc…

Continue Reading

JPEG + PNG Color Management Strategies for the Web

The first step in the design process of any website is to mockup the design in Photoshop. One of the most frustrating parts of the design process can be converting your mockup into image slices whose colors mix well with native CSS styles. Mark Edwards, over at Bjango, has a great writeup on color profile management and UI design. The basic tenants are: don’t color manage, use native monitor color profile, use RGB, and do not attach color profiles to JPG or PNG images. However, in my senario, I often work with graphics that have been designed by people who work in print and don’t understand web image generation in the slightest. Often I’ll receive unoptimized PNGs, JPGs in CMYK, images with color profiles, etc…

Continue Reading

Copy Path / Directory to Clipboard OS X Lion Service

Someone at work recently wanted an easy way to get the path of a file in a format he could paste into an IM or an email. I wrote up a quick applescript and bundled it into a service which enables a user to easily copy the path of a file to the clipboard. The package also includes a service that copies the directory path of a given file to the clipboard. The biggest use case for this service is for an office environment where many people are connected to the same drive externally via VPN or internally via ethernet. It is challenging to easily point a colleague to a specific file if your shared drive is badly organized (which, odds are, it probably is). This tool mitigates most of that issue and works consistently across machines.

Continue Reading

Setting Up QuickBooks on Windows XP Professional for Multi-user Environment

Recently I was involved in a project moving a company’s files from a old 2003 windows exchange server to a mac mini server setup. The first setup was to move from Exchange’s email and calendaring to Google Apps. After that step was complete we moved the shared files drive over to thunderbolt RAID 5 storage attached to a mac mini server device. The transition was pretty smooth, however there was one problem which wasted a significant amount of time. The accountant’s in the organization use QuickBooks 2010 for all accounting purposes. Moving to a hosted solution was not an option, and they needed multi-user access to the file (2-3 people could be working on the same quickbooks file at any given moment)…

Continue Reading

Migrating Rules From Microsoft Exchange to Google Apps

Recently I was part of transitioning the email system of a 20+ employee business off of a Microsoft Exchange 2003 server to Google Apps. Moving close to half a million emails to a new email service was a big decision. The transition tools that Google has in place are pretty good, albeit slow for that many emails, Google throttles email transfer to one each second after the first 500. However, the one piece that was missing was a good tool to transition outlook server rules. Many employees used those rules extensively and many had 50-100 rules. Outlook does not have any method in place for extracting those rules…

Continue Reading

eBay PHP Framework, Tumblr for Kohana, and More

I’ve been throwing a decent amount of code on GitHub + Gist recently; I wanted to highlight a couple of the projects that the community might find useful. eBay PHP Framework Wrapper There isn’t a ton of documentation or examples around the eBay PHP Accelerator toolkit. Actually, I think it has been a couple years since the framework itself has been updated. I’ve put together a small eBay PHP library with some generic posting and searching wrapper functions. The code was pulled out of an active project and still has some references to the context in which it was situated, but it should provide a good starting point to anyone looking to work with the eBay PHP framework…

Continue Reading

MacRuby Deployment + Load Order

After reading the official MacRuby docs on deployment, I read over this guide. Although the deployment build seemed to be working fine on my local machine when I dropped it on my laptop with a standard Lion install it crashed, claiming that there was an defined constant – but that constant was a class. How could it be undefined if it ran fine locally? Looking into it a bit more the class that was undefined was being used as a superclass for another ruby class. Taking a look at rb_main.rb revealed that there is no specific load order. Since the load order was undefined, the class requiring the other ruby class as a superclass was being loaded before the superclass was loaded…

Continue Reading