>>> import MySQLdb
/Library/Python/2.7/site-packages/MySQL_python-1.2.3-py2.7-macosx-10.7-intel.egg/_mysql.py:3: UserWarning: Module _mysql was already imported from /Library/Python/2.7/site-packages/MySQL_python-1.2.3-py2.7-macosx-10.7-intel.egg/_mysql.pyc, but /Users/jhaddad/Downloads/MySQL-python-1.2.3 is being added to sys.path
Traceback (most recent call last):
File "", line 1, in
File "MySQLdb/__init__.py", line 19, in
import _mysql
File "build/bdist.macosx-10.7-intel/egg/_mysql.py", line 7, in
File "build/bdist.macosx-10.7-intel/egg/_mysql.py", line 6, in __bootstrap__
ImportError: dlopen(/var/root/.python-eggs/MySQL_python-1.2.3-py2.7-macosx-10.7-intel.egg-tmp/_mysql.so, 2): Library not loaded: libmysqlclient.18.dylib
Referenced from: /var/root/.python-eggs/MySQL_python-1.2.3-py2.7-macosx-10.7-intel.egg-tmp/_mysql.so
Reason: image not found
About 4 years ago I decided to write a little GUI tool for manually testing API calls. Put it on the top of my blog, people have downloaded it, and I haven’t touched it since then. Last updated timestamp was 2007.
I don’t know if anyone wants it, but it could be useful as a starting point, or to understand how Cocoa apps were written… 4 years ago… I don’t know. Whatever.
I like running VirtualBox headless on my Mac. It doesn’t show up in the Dock, and feels like it’s a remote server.
First, figure out which VMs you have on your machine.
haddad-work:~ jhaddad$ VBoxManage list vms
Oracle VM VirtualBox Command Line Management Interface Version 3.2.6
(C) 2005-2010 Oracle Corporation
All rights reserved.
"WebServer" {2c61a180-e098-4926-b09a-27e431791c88}
_As of a few hours after this post, I’ve given up trying to get Puppet Master running on Snow Leopard. There appears to be an issue with the SSL certificates generated that’s preventing puppetd from getting it’s recipes. There doesn’t appear to be any way to disable this. I have switched to a CentOS VM, which worked perfectly the first time. The Unixy underpinnings of my Mac seem to be getting less and less useful every day.
_
If you’re using Snow Leopard, the drive will not be able to mount. You can get around this by deleting /Applications/Macfusion.app/Contents/PlugIns/sshfs.mfplugin/Contents/Resources/sshnodelay.so
I’ve tried so many times to use Spaces, and I keep failing. As useful as it should be, it just never was. And I’ve finally realized why. Most of what I do is in a web browser. And spaces just wasn’t made for that. I want Gmail to always be in space 3. Facebook on 4. It just wasn’t meant for that.
I’ve recently discovered Fluid. Fluid brings creates Site Specific Browsers. This means I have an actual application that I launch called Gmail. It’s independent from everything else, doesn’t crash when Safari does (which, to be honest, is all the time). I can assign it to a space. So good.
It’s unfortunate that I’ve reached this point, since I thought quicksilver was a really awesome piece of software. Unfortunately, it’s just gotten to be completely unstable. Beach balls became all too common. So common, that I was willing to cough up $20 for LaunchBar after only trying it out for 10 minutes.
I never was a power user of quicksilver - I did like a lot of things in theory, but I never took the time to memorize the keyboard shortcuts. Since Launchbar is a commercial product, hopefully it hangs around a lot longer. That and I paid for it.
I just bought a 1TB Western Digital drive. I am stoked.
However, I tried to format the drive on my Mac (Leopard) and got the error “File system formatter failed” when I tried to format the disk as MacOS Extended (Journaled). Not cool.
I found this forum thread which suggested using multiple partitions to solve the problem. When I was trying this, I went into options and changed the partition scheme from Master Boot Record to GUID partition table. It formatted fine.
I need to compile something and use the MySQL C++ library. I have mysql and mysql++ already compiled, I won’t go over how to do that now.
I added the following code to the top of my source:
#include <mysql++.h>
I got an error
/Users/jhaddad/dev/search_engine/main.cpp:4:21: error: mysql++.h: No such file or directory
Not cool.
How to fix:
In XCode, open up the project settings (under the project menu). Click the build tab. Go down to search paths, and you can change your Header search paths to the correct locations where you installed whatever you’re looking for. In this case, mine was /usr/local/includes and /usr/local/mysql/
I wasn’t able to find anything that I liked. I basically wanted a front end for curl with bookmarks.
Check out my cleverly named Api Tester. No docs yet, but I hope it’s self explanatory. Click the plus on the bottom left to add a bookmark. It’s freeware. Or, just download.
For a while I had to use a Windows box for my development. Fortunately, I was able to make a good case for my company to switch me to a MacBook Pro.
One of the tools that took me a while to track down was a regex testing app. On Windows, I was a big fan of Regex Coach, which is a great app.
I was happy to find QuRegExmm. It’s not nearly as feature rich as Regex coach, but it seems to be good enough for me, since I really only want to test regular expressions, not really do anything else with it.
I ran into an issue trying to get Imagemagick (convert) working on OSX last night. I had compiled libjpeg and installed it, but when I would compile convert, it would not have jpeg support.
I found this post on dzone, which I followed and was able to use libjpeg just fine.
tar zxvf jpegsrc.v6b.tar.gz cd jpeg-6b cp /usr/share/libtool/config.sub . cp /usr/share/libtool/config.guess . ./configure --enable-shared --enable-static make sudo make install sudo ranlib /usr/local/lib/libjpeg.a