No man can serve two masters

LOLZ! My friend Isaac came up with a hilarious quote today, based off a famous pieces of scripture:

“No man can serve two APIs: for either he will hate the one, and love the other; or else he will hold to the one, and despise the other. Ye cannot serve Cocoa and Win32.” - Jobs 4:20

‘Course credit due, I’d like to say I inspired the scripture reference by mentioning, “is this the inspired word of Jobs?”

Digg This
February 27, 2008, 10:47 am

Setting up PHP and MySQL with Apache 2 on Mac Leopard

I’ve had to set up PHP and MySQL on two mac’s now, and found these brief set of instructions on setting up PHP and MySQL on Mac OS X 10.5 (Leopard) to be so helpful, that I’m going to reprint them here as a mirror to his instructions. Thanks to MyMacinations.com for providing such helpful instructions!

And now… his instructions on setting up PHP and MySQL on Apache 2 for Mac Leopard:
===========================

Leopard brings one big change to web developers working with Apache, PHP and Mysql on the Mac. Apache 2 comes with Leopard along with PHP 5.

Here is what to do to restore a test environment.

First, you need to enable PHP.

Apache’s .conf file moved from /private/etc/httpd/httpd.conf to /private/etc/apache2/httpd.conf

Open this file with your favorite text editor and uncomment the line:

# LoadModule php5_module libexec/apache2/libphp5.so

You don’t need to add the mime type for php, because it’s already done for you under leopard. The last line in the .conf file is:

Include /private/etc/apache2/other/*.conf

The “other” directory contains a .conf file for php5. That takes care of the mime type and the index.php configuration for php sites.

If you develop multiple sites and you need virtual hosting functionality, scroll down to the end of the .conf file and uncomment the following:

# Include /private/etc/apache2/extra/httpd-vhosts.conf

That’s all the modification that I had to make to to the httpd.conf file.

Next, you’ll need to setup whatever virtual hosts you have in the virtual hosts file /private/etc/apache2/extra/httpd-vhosts.conf

For example, for each line that you set up in your hosts file like so:

beta-site-1.com 127.0.0.1

You need to make an entry in the httpd-vhosts.conf file like so:


ServerName beta-site-1.com
ServerAlias www.beta-site-1.com
ServerAdmin webmaster@beta-site-1.com

DocumentRoot “/Library/WebServer/beta-site-1″
ScriptAlias /cgi-bin/ “/Library/WebServer/beta-site-1/cgi-bin”

Options FollowSymLinks MultiViews Includes
AllowOverride All
Order allow,deny
Allow from all

One good thing is that the “upgrade” install of Leopard does not mess with your hosts file, so whatever virtual domains you may have set up won’t be affected.

If you had Mysql installed previously, good news too, Leopard’s installer won’t touch it. I found mysqld running just like before the upgrade.

One thing changed with Leopard is the socket for Mysql. It moved to /private/tmp, so you may need to configure your php.ini file to point it to the new location.

To do so, open the file “/private/etc/php.ini”, (if no such file exists, then make a copy of “/private/etc/php.ini.default” naming it “php.ini”) and edit that.

You have two lines to modify:

mysql.default_socket =

becomes:

mysql.default_socket = /private/tmp/mysql.sock

and mysqli.default_socket =

becomes:

mysqli.default_socket = /private/tmp/mysql.sock

of course, from the sharing pref pane, stop the server and restart it and voila!

===================

Digg This
December 5, 2007, 11:34 am

A little monkey snooping

Careerbuilder.com has a new website out there (er, it’s probably been out for awhile) that allows you to send people “monk-e-mails” — customizing a monkey with some various audio capabilities, including text-to-speech.

Of course the messages are not private (Careerbuilder says so), so any snooping with the ID value gives you other messages people threw together.

To make my poking around a bit more productive (without having to type in ID numbers), I put together a little page that does the magic for me. Introducing: MonkeySnoop!

Digg This
October 25, 2007, 2:51 pm

CSS quirks: div layers and h1 tags

I deal with stylesheets every day and frequently have to find ways around the oddities and quirks between both Firefox and Internet Explorer. One quirk that’s been bothering me for quite some time now has surfaced again, and I figured out a “fix” for the issue.

The problem: When I have a <DIV> tag initiating a content section and it is immediately followed by an <H1> tag, it does something funky. The <DIV> tag pushes itself down in the layout about 18 pixels or so depending upon the size of your H1 font.

Allow me to illustrate:

CSS quirk 1 -1

What you see here is Firefox 2.003 (left) and Internet Explorer 6.02 (right) with the arrows indicating where both browsers are interpreting where my div tag “begins.” As far as code structure is concerned, I’ve got a small nested div setup under the header (the blue bar)… like so:

CONTENT
–left column (floats)
–center column (static)
–right column (floats)
/CONTENT

That shadow is a background element of each of the nested div tags and is supposed to line up. However, throwing that H1 tag into the center column div throws everything off. The H1 tag (along with all other heading tags) have a margin-top value—I’m not sure what it is, and I don’t really care—all I know, though, is that it is forcing the center column div tag to start LOWER than it really ought to.

So I tried something out—I added a line-break tag after the start of the center column div tag, but that produced not-so-desirable results:

css quirk 1 - 2 with BR tag

The arrows show that both IE and Firefox cannot seem to agree on just how much space to give a line break. While this did solve the problem of moving my div tag down, it posed another problem; therefore there’s got to be another solution out there.

So I gave this a try—instead of putting the “fix” in the HTML, I tried adding a padding-top value in my center column of 1 pixel. Which produced the near-desired result:

CSS quirk 1 -3 - fixed...sort of

Both browsers are relatively matched up, but there is a three pixel difference between Firefox and IE. While that may be sweating the small stuff, that kind of variance is what can make creating more complicated layouts more difficult than they need to be.

Anyway, I hope that this little discovery is helpful to others that are experiencing div placement quirks with Internet Explorer and Firefox.

Digg This
March 22, 2007, 9:52 am

Close captioned video for the web using Macromedia Flash

UPDATED 1/9 AT 5:20 CST WITH NEW VERSION INFO

A colleague of mine with the State of Minnesota asked me if I knew how to do close captioning of video for the web. Admittedly I did not, but that didn’t stop me from looking into it. Within a five minute search of Google, I found a link on the Law, Health Policy & Disability forum at the University of Iowa showing a proof of concept, that you can indeed take a video file and apply some level of close captioning to it using Flash.

To save you some time of hunting all the files down, I’ve put together an instruction page with a demo of how it works. The only grunt work you have to do is: acquire the exact length (in seconds) of your video file and create a close captioning text file based upon the example one I link to. You then just have to modify an XML file and you’re all set to go. See the instructions for details. (Version one had you passing a bunch of variables and it was kinda clunky to work with. In version two you’re able to put everything you need in a single XML file.)

I hope this helps you out. It’ll sure help me out when it comes time to provide close captioned videos for the State.

Digg This
January 9, 2007, 4:48 pm

Web design-centered podcast

For a few months now I’ve been doing a podcast with my band Crash Effect and have been having a bit of fun with that. Last week I was invited to participate in a podcast (that was recorded live via a web conference) that centered around various facets of Christian spirituality, including current news and some blog entries that we’ve found interesting.

So that put the bug in me to put together a podcast centered around web design. I’ve been designing websites for nearly twelve years now and consider myself to be one of many leaders within my community, a leader in web design that has been there from the very beginning and continues to evolve in skill and application. I also know and recognize that the world does not look to me for design help—and I’m quite fine with that, believe me. I don’t care to have that kind of pressure. But that said, I do feel that there is still an audience that may find what I have to say helpful.

Last night I put together the first three pilot episodes [they're going to run weekly starting January 14th] to give myself a head start. I still have to design the website that will surround the podcast (and its associated resources), but that won’t take me long.

If you want to get a sneak peak at what the podcast will sound like, you can download the first three episodes here:
episode 001: Noise-Free Design: Value
episode 002: Noise-Free Design: Function
episode 003: Noise-Free Design: Usability

Admittedly this is some pretty high-level information that I have in these first few podcasts, but it’s meant to serve more as an introduction to the components that help make websites successful.

Anyway, give a listen and let me know what you think.

Digg This
January 6, 2007, 2:05 pm

testing your website design

I came across a fabulous resource for testing your website design within other browser and operating system environments.  Check it out.

Test your web design in different browsers - Browsershots

Digg This
September 20, 2006, 11:46 am

Microformats, hCalendar & Gmail manager

Spent a little time perusing my blogroll and saw some cool resources that I wanted to highlight—perhaps if only for my own reference, but also for generating a little bit more awareness.

The first cool thing is this plug-in for Firefox called the Gmail manager. If you have more than one Gmail account like me, checking mail on said accounts is a bit of a hassle. Gtalk doesn’t help any because it’s account-specific. However with the Gmail manager plug-in for Firefox, you can toggle (with a right-click on the task bar) between accounts to see how many new messages you’ve got in either and a single-click sign-on. That RAWKS! It’s a must-have plug-in for Firefox.

The second cool thing that I came across today was what’s called Microformats. I know it’s probably been around for awhile, but it’s new to me. Esssentially it works like this…it’s a method of providing a dynamic feed of contacts, calendar events and reviews. I think generally Tails (these contacts and calendar feeds) are generally treated as a sort of sidebar type element or plug-in of Firefox and other more progressive bars (yes that would leave IE out of the picture).

I don’t fully understand tails, but I can see the potential…particularly with my band CRASH EFFECT. It’d be a great way to share our upcoming show information and allow people to add that information to their calendar with relative ease.

As far as the hCard goes, I don’t think that is such a great idea. With all the data mining software out there attempting to harvest more and more e-mail addresses (for spam purposes), the idea of openly sharing your contact information in a universal format spells trouble.

Anyway, here’s a brief tutorial for integrating Tails into WordPress that you might find interesting. As well as a web-based hCalendar Creator. But it looks like it wouldn’t be that difficult to create the feed manually. Below is an excerpt of what the code looks like to create an hCalendar feed:


<div class="vevent">
<a class="url" href="http://www.crasheffect.com">
<abbr class="dtstart" title="20060915T2000-0600">September 15th 8pm</abbr>,
<abbr class="dtend" title="20060916T2300-0600"> 11pm 2006</abbr> —
<span class="summary">My Event Name</span>— at
<span class="location">Saint Paul, MN</span>
</a>
<div class="description">This is my description tag here where I can fill in information about the event.</div>
</div>

It appears that the start title (20060915T2000-0600) is the following date coding convention:

YYYYMMDD T 24HOURTIME +/-GMT

So that is the 4-digit YEAR, 2-digit MONTH, 2-digit DAY, the letter T (for time), the 24-hour, four-digit format of the time (starting or ending depending upon the tag) and then followed by where you are in respect to GMT time. In our case here in Minnesota, -0600. So for today’s date and current time, it might look like this:

20060915T1000-0600
Translation: 9/15/2006 10:00 AM, -0600 GMT

Everything else in the tags seem pretty self-explanatory. If I find out more information about Microformats, I’ll be sure to post it here.

Digg This
September 15, 2006, 10:01 am

Another euphemism for your microsoft products

So I’m sending an .html attachment through Outlook at work (yeah…I know…it’s Outlook). Well, I dragged the file over and must have accidentally dragged it to the body area. Next thing I know, MICROSOFT WORD opens up to edit the HTML for me.

Enter my euphemism for the day:

Editing HTML with Microsoft Word is like fixing a car with a popsicle stick. It ain’t ever gonna happen.

Digg This
August 24, 2006, 3:57 pm

Speaking of ugly…

Remember when the <blink> tag became a long-forgotten tag, discarded as being irrelevant and only to be resurrected on the occassional intentional abuse for humor’s sake??  Well, some scallywag is actually using blink as an text-decoration attribute in their layout….for their links.

Brace yourself…this is going to get ugly:  10dollarpayroll.com

Digg This
August 11, 2006, 3:01 pm
« Previous Entries