Sharing a Snippets Library through Dropbox

I’ve been using the Mac application Snippets and it’s been getting better with each new release. One essential feature that’s still missing is any support for syncing a library through a service other than MobileMe. I’ve even contacted them about the issue, as many have.

However, I’ve recently learned that there is a way to share the library using Dropbox – not sync it, but share it. Simply move the library itself. I had considered this option before (since it’s how I use 1Password) but there seemed to be no way to move the Snippets library.

(more…)

Mac OSX Finder Droplet for Windows-friendly Zip Files

I frequently prepare course materials on a Mac which will be distributed to users on a variety of machies. Not only does the default “compress file” feature include the .DS_Store hidden files, but it also includes all of the resource fork files which, when viewed on a PC, appear as “__MACOSX”.

I really like the convenience of a toolbar droplet (which I already use for opening the terminal and tar/gz compression). I searched around for a solid zip archive droplet that would not use the ditto service (which includes the resource fork data), but couldn’t really find anything – so I wrote my own.

Download the following application and place it in your Applications folder, and drag it into your Finder toolbar. Any files or folders you drag onto it, will immediately be compressed – without any Mac-specific extras.

Download ZipDroplet

Git Status in Command Line

There are many tricks out there to get the git status to show in the command line path, but here’s one that worked the best for me on a Mac OS X Snow Leopard machine.
(more…)

Installing Git on Mac OS X Snow Leapord

Git is an amazing source control system, and is even better when used with GitHub.com. Installing git on Mac is pretty simple.
(more…)

Magic Mouse

I was planning on getting a magic mouse for my office machine sometime in 2010, but my parents got one for me for the holidays. It finally arrived and I’ve had some time to play with it. Here are some briefs thoughts and comments.
(more…)

Apache VirtualHosts on Internal Network (No DNS)

It’s quite common for web engineers to develop applications on either a local machine, or a server running on the local network. In many situations one does not have the luxury of a domain name service to base everything off of, and it becomes a matter of using the IP address or an internal host file.

For example, I have an internal server that we do most of our development on and we’ve typically placed everything in the default htdocs directory. That tends to be a problem if we’re working on a pre-existing application that was designed to work only from the root level.

In the following steps I’ll describe setting up a virtual host and how to trick your computer into simulating the domain service.
(more…)

Integrating QuickBooks for Mac-based Users

During development of a recent point-of-sale / e-commerce package, I started researching ways of exporting data from a web-based application into QuickBooks. A decent tool called Web Connector allows QB to connect with a web source and share information, and there’s even what appears to be a very thorough PHP class for interfacing.

However, Web Connector is Windows-only. My client runs a Mac.

Disclaimer: Prepare to be disappointed.

(more…)

NetBeans 6.7RC1 Crashes on Mac OS X 10.5.7

After an hour of searching, I found that the problem for me was that java 1.5 on mac was forcing netbeans to run in 64bit mode which was causing it to crash before it even opened.

By following the instructions (reposted with more info) at http://blogs.sun.com/yakshaving/entry/netbeans_will_not_start_on) I was able to get things resolved. As far as I can tell, I have not affected anything else I have.

Missing mysql.sock on Mac OS X

Update: A second solution involves changing a hostname in your PHP file from localhost to 127.0.0.1. More info.

Recently I was doing some local development on my Mac OS X Leopard machine. When running apache2 with php I was able to connect to the database just fine, and from the command line I was able to run mysql commands.

However, when running a php script from the command line I was getting an error:

Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2)

After spending some time thinking it was the code, I discovered that the mysql.sock file was missing.

Others on the net found the file elsewhere, like /private/tmp/mysql.sock or /tmp/mysql.sock but I had absolutely no .sock file anywhere.

Turns out, it did exist, but was named differently. According to the phpinfo output, the file was located at

/usr/local/mysql/run/mysql_socket

So, the solution was to create a symlink in /var/mysql to the proper file.

sudo ln -s /usr/local/mysql/run/mysql_socket /var/mysql/mysql.sock

New System: iMac 20″ 2.4Ghz

A few weeks back my old primary system suffered some serious boot issues and was out for an entire day. After a lot of time wasted trying to save things with knoppix, etc, I finally went out and bought a new system.

I’ve grown used to developing on windows so things have been a little slow, but I’m gradually adjusting to using a mac. I’ve already moved my dev server and my subversion server to this machine so I’ve brought the old system home for triage. Eventually, it will allow me work from home whenever I need to, and it allows us to play games again.

Two of our other systems are now up for sale on craigslist/ebay.

So far though, I’m doing just fine and am enjoying the new system. It’s much cleaner, more intuitive, etc.