» Year in review: 2008

2008 was a pretty busy year — a lot of things happened that made it quite a ride. I thought I would take a moment to go over some of the more notable events that have occurred in the last 366 days.

UPDATE: It took me almost three months to realize that last year was a leap year. My apologies to 02/29!

Continue reading “» Year in review: 2008”

» Now Featuring Pretty Permalinks!

In case you weren’t already aware this site or blog, whichever you prefer, is running on Mac OS X Leopard 10.5.2 (not server) and is powered by the WordPress blogging engine.  Because this site is running on a simple Mac mini with Apache enabled the project is extremely “DIY” and as such I have had to figure it out as I go along.  No fancy hosts or one-click installs here, everything has been extremely manual; except, of course, the Famous 5 minute WordPress Installation!

One hurdle I have had to overcome is being able to use pretty permalinks to make my site more friendly.  Permalinks (short for permanent link, get it?) is a static URL to some content on a site.  That content can be a specific page, a particular article/post, or a collection of posts within a certain category.  

By default WordPress’s permalinks follow this format: http://somesite.com/index.php?p=1 and unfortunately that format is just plain ugly.  Having a pretty permalink like this: http://somesite.com/2008/01/01/sample-post/ means hyperlinks on your site and around the web will be more attractive and usable to others.

Read on if you want to know my story about the trouble and success I had with getting pretty permalinks working on my site.

Continue reading “» Now Featuring Pretty Permalinks!”

» Hosts file issue

When I was first setting up wordpress on my Mac mini (which as you’ll recall is on my dedicated DSL line) I ran into a problem using the dynamic DNS name I had set-up.  With wordpress when I wanted to visit the site from inside my LAN it would automatically re-direct to the location of the set determined in settings.  This caused a problem because that location pointed to my dynamic DNS which in turn pointed to my WAN IP address and well as you can imagine wordpress go boom.

My temporary workaround during installation and initial set-up was to ignore this entirely as I was only working on the site from home.  This was short-lived as I realized I had a life and wanted to work on the site when not sitting in my home office.  Oh, yeah, and I guess I wanted the rest of the internet to have access as well – I suppose that was a factor as well.

What I ended up doing was using two hosts files, one that had the following line:

10.0.1.195     aroncares.dnsdojo.com

and another that had that same line commented out:

#10.0.1.195     aroncares.dnsdojo.com

To quickly switch back and forth I used two shell scripts, set to open by default using Terminal, that copied a “home.hosts” or “away.hosts” file on top of the hosts file.  (FYI, in Leopard, this file is located at /etc/hosts)  This worked great and was easy enough, but it didn’t have the panache that I was looking for in this situation.

The final solution that I worked out is really everything that I want (unless you include my desire to have this site hosted elsewhere) given the situation.  What I ended up doing was taking a crash course on AppleScript and writing an application that would simply ask me whether I’m home or away and act accordingly.  Interestingly I was able to give the shell script root privileges which is required to make changes to the hosts file.  For anyone that is interested I have pasted the syntax of the script after the jump.

Continue reading “» Hosts file issue”