Brad's Blog

PyGraphviz on OS X (SL) with virtualenv 2010-07-14

There's this cool project called django-extensions that (among other things) adds a lot of commands to django's manage.py offerings. One of which is ./manage.py graph_models [appname] which will generate a nice graph displaying the relationships among all of your Models. This comand needs pyGraphViz, though, and I was a little disappointed when i discovered I couldn't install pyGraphViz with pip install pygraphviz. (ok, a lot disappointed). I eventually got this working, and here's how ...

Building PIL on OS X: Snow Leopard 2010-02-25

There are several places online that discuss problems installing PIL on Mac OS X Snow LeopardThis is how I got it to work.Install lib jpeg using homebrew (which is super-aweseome!) brew intall jpeg.This installs the library into /usr/local/Cellar/jpeg/7Install libfreetype the old-fashioned way (./configure, make, sudo make install). I used freetype-2.1.10.pre-20050511.Download, unpack PIL (I used Imaging-1.1.6). I had to make the following changes to setup.pyFREETYPE_ROOT = "/usr/local"JPEG_ROOT ...

Mercurial installation woes on Mac OS X 2009-09-30

I started using mercurial around version 1.2, and I'm pretty sure I used the Mac OS X installer (from http://mercurial.berkwood.com/) to install 1.2.1. This placed hg in /Library/Frameworks/Python.framework/Versions/Current/bin/.Now, I've decided to upgrade to 1.3.1, and I again grab the Mac OS X installer (again from http://mercurial.berkwood.com/), which installs hg in /usr/local/bin/.Ok, but my path is set up ...

Safari is Cooler than you Think! 2008-09-04

When you really start digging into Mac OS X, it's fairly mind-boggling how much extra stuff it has that your average user never sees. I recently encountered a problem on my MacBook Pro, where the Optical Audio was overriding my internal speakers, which prevented me from hearing any audio (without using headphones). Unfortunately, there's no easy-to-access preference pane to enable or disable various audio devices. This led me on a search for command-line utilities to manage system preferences ...

Mac OS X, Python, and Fink: Playing Nicely Together 2008-06-25

Since upgrading to Leopard, I've been using Mac's default install of Python (which is 2.5.1). For the most part it's worked well for me, namely because I've installed additionaly packages either using Mac installers or through easy_install. I recently needed to install python-ldap which didn't work using easy_install. So, I turned to Fink.Unfortunately, Fink wanted to install it's own version of python (2.5.2) as well. (I say unfortunately only ...

PyOpenGL on OS X 2007-10-16

Update: July 7, 2010: For the past year or so I've been using virtualenv, virtualenvwrapper, and pip to manage and install python packages, and I highly encourage everyone to use these tools! It may take a bit to learn how to use these tools, but once you do, the rewards are great! (especially when using 3rd party python libraries on Mac OS X).To install PyOpenGL using the aforementioned tools, you'd simply do the following.Create a virtual ...

Pygame on OS X with python 2.5 2007-09-23

I've used Pygame on Mac OS X in the past, but my installation recently stopped working for some reason, so I decided to grab the binaries and re-install. After checking out the Pythonmac list, I was a little disappointed to see that there were only Pygame binaries for Python 2.4. Below is a list of software that I installed (in the necessary order) to get pygame working with Python 2.5 on OS X. All of these (except ...

Compiling Warzone 2100 on Mac OS X 2007-06-16

I recently ran across The Warzone 2100 Resurrection Project, and I thought to myself,"cool, I wonder if there's an OS X version..." So, I hit their downloads page only to find the message: "(The MacOSX diskimage will follow soon)"So I thought, "oh well, I'll just grab the source code and compile it!" After about two hours of digging, I finally got it compiled, and here's how! (NOTE: I've got quite a bit of Unix ...

MacMathematics 2007-04-23

One of my Favorite Mac Apps is Grapher. It lets you graph everything from simple 2D equations to complex 3D equations. For example, want to see all of the Axes of symmetry for a cube? Just enter the equations x=0, y=0, z=0, x=y, x=-y, x=z, x=-z, y=z, and y=-z, and voila! Pictures make math fun! You can also save these in .gcx files. Download my cube: CubeAxesOfSymmetry.gcx

MacMathematics 2007-04-23

One of my Favorite Mac Apps is Grapher. It lets you graph everything from simple 2D equations to complex 3D equations. For example, want to see all of the Axes of symmetry for a cube? Just enter the equations x=0, y=0, z=0, x=y, x=-y, x=z, x=-z, y=z, and y=-z, and voila!Pictures make math fun! You can also save these in .gcx files. Download my cube: CubeAxesOfSymmetry.gcx

Automatic Backups with cron, tar, and SSH 2007-01-10

Everyone knows that backups are important, but how many of us regularly back up our own websites, blogs, or whatever? Well, I've put together a relatively simple way for my Mac to log into my Linux-based webserver, archive some content, and download it for me. All of this is done Automatically, too!The first thing I had to do, was set up my home machine (a Mac, but any Unix-based system should work, too) so that it could log ...

DiskWarrior Rocks! 2006-11-01

...the title says it all. For just less than $90 USD, I've now recovered all of my priceless data for which I did not have the foresight (or time, or means, or whatever) to back up. If you're a Mac user, and you ever have a drive that stops working (or a problem like mine), head over to http://www.alsoft.com/DiskWarrior/ and purchase a copy.

Flu + HDD crash 2006-10-23

If having the flu wasn't bad enough, I've also had the hard drive in my Mac mini crash... well, not crash exactly, it's just the drive has A Bad Super block, which is enough for tools like Disk Utility and fsck to be useless. Apparently there's a product called Disk Warrior that could do the trick... I may have to try it out.The real tragedy here, though, is that of course, there's data on ...

Spiral 2006-07-28

I've recently grabbed the latest version of Inkscape, (which resulted in the Spiral) and I just have to say, "WOW". I'd played with the software about a year ago (maybe more), and it's amazing how far it's come. Works perfectly on Windows and Mac OS X (with X11). If you like to use your computer to draw, download Inkscape now!