CSS Font Order

When designing web pages, using the appropriate font for your design does wonder to the overall look, feel and layout of your page. Unfortunately, web designers are quite limited to the fonts they can use. Most web designers stick to the tried and true “web safe” fonts.

If you take all considerations including operating systems: Windows, Mac OS X, Linux, Unix, and browsers: IE, Firefox, Safari, Opera, etc, then you are really stuck with just 3 of the safest fonts on the web. They are: Arial/Helvetica, Times New Roman/Times, and Courier New/Courier.

Other fonts that work across platforms are: Palatino, Garamond, Bookman, and Avant Garde.

Fonts that work in Windows and Mac OS, but not in Unix+X are: Verdana, Georgia, Comic Sans MS, Trebuchet MS, Arial Black, and Impact.

If you like to consider all OS platforms in your design, then the order of your fonts in CSS is important. I recommend this sequence.

Establish a Baseline

At the very least, you need to establish your baseline font. Choose whether you want “Serif or Sans-Serif” font. The CSS would look something similar to this:

html { font-family: Serif}
html { font-family: Sans-Serif }

Choose a Web Safe Font

Next, choose a “web safe” font. Your choice comes down to either taking Arial/Helvetica, Times New Roman/Times, and Courier New/Courier. Most people don’t use the monotype Courier font except when displaying code. So, you are essentially down to four fonts, Arial/Helvetica or Times New Roman/Times. Helvetica is very popular. Arial is not far behind. New Times Roman is better than Times. In our example, will now look like this:

html { font-family: Times New Roman, Serif }
html { font-family: Arial, Sans-Serif }

Choose a Cross-Platform Font

If you must, you can choose a “cross platform font.” Again, our choices are: Palatino Linotype, Garamond, Bookman, and Avant Garde. The first 3 are Serif fonts. Avant Garde is the only Sans-Serif font.

html { font-family: Palatino Linotype, Times New Roman, Serif }
html { font-family: Avant Garde, Arial, Sans-Serif }

Add Other Fonts

If you must, you can choose other fonts, although they do not work in Unix+ systems. They are: Verdana, Georgia, Comic Sans MS, Trebuchet MS, Arial Black and Impact.

html { font-family: Georgia, Palatino, Times New Roman, Serif }
html { font-family: Verdana, Avant Garde, Arial, Sans-Serif }

There you have it. A safe way to implement CSS Fonts across all OS platforms.

Ubuntu Going from Brown to Gray

There are rumors and rumblings that Ubuntu might be going from brown to gray. I certainly would welcome the change. I think, you can only be brown for so long. I think it’s time for Ubuntu to get a face lift, a much needed one. Maybe some Botox shots.

What could be better for the most popular Linux distro in the world to get a new color scheme. Gray is a good start. To tell you the truth, I wasn’t so very keen on the brown color to begin with. After years of color deprivation, I finally switched to a non-earthy color, like green.

Currently, I’m using Linux Mint, a derivative of Ubuntu. If Ubuntu switches to gray, I think it will attract more people to use Ubuntu. By the way, my theme just went from black/white/red to black/white/gray scheme. I’m ahead of the curve. Just pure coincidence.

If the rumor were true, I can’t wait to see this new color scheme.

Run Multiple Applications in CodeIgniter

You’ve installed CodeIgniter and you’ve written a couple of applications. Now, you want to run two of your applications under one install of CodeIgniter. The following article discusses how to run several applications within a single install of CodeIgniter. The approach is accomplished using Apache’s Virtual Host.

Install Apache Virtual Host

1. To add a virtual host, edit /etc/apache2/sites-available/default. We will use “vhostname” as the virtual hostname in this example. Edit the default file and add the following:

<Virtualhost *:80>
ServerName vhostname
DocumentRoot /var/www2

2. Run the a2ensite script which enables your virtualhost within the apache2 configuration. It creates symlinks within /etc/apache2/sites-enabled.

# sudo a2ensite vhostname

3. Restart Apache

# sudo /etc/init.d/apache2 restart

4. Check your virtualhost if it’s working by pointing your browser to http://vhostname.

CodeIgniter Setup

One way of setting up CodeIgniter to support multiple applications, is to have separate folders for each application. You can set up your CodeIgniter directories like the following:


1. Under the “app1/config” directory, edit the config.php file. Point your application to be hosted at vhostname by changing the following line:

$config['base_url'] = "http://vhostname/";

2. Copy the “index.php” file under the main CodeIgniter directory to the http://vhostname web root directory.

3. The “.htaccess” file recommended by CodeIgniter also needs to placed to the web root of http://vhostname.

4. Open your browser and check if your application is working by placing http://vhostname in the address bar of the browser.

5. Repeat steps 1-4 to add additional virtual hosts. That’s it.

If you have questions or suggestions, please leave a comment.

Another New Look

All right, not wanting to get stuck with a certain theme, I decided to get really, really simple. It has lots of white space and it’s even colorless. This is likely to be a temporary patch until I can find a decent theme. In the meantime, this will do for now.

I’m kind of looking forward to the new WordPress which is being merged with WordPress-Mu in the next release. I’m not sure yet what the implications are to the upgrade. I will most likely take advantage of the multiple installs on one platform as opposed to having multiple WordPress installs.

Another product that I’m looking excited about is Ubuntu 10.04 which is going to be LTS or Long Term Support. It has been two years since the last LTS. The only issue is I’m really starting to like Linux Mint. I have been using it for 3 months. There is usually a one to two month delay before Mint follows Ubuntu.

I have been playing around with CodeIgniter. It’s a MVC framework that makes you write fast kickass PHP programs. Well, that’s what CodeIgniter website says. The only gripe I have with CodeIgniter is the way it latches on to one application at a time. You kinda have to edit the configuration file to switch to another application, but I found a workaround by installing Apache Virtual Hosts. One virtual host per application. Maybe, I’ll document and write about it when I have time.

Finally, I got a chuckle when I saw this article, “Seeking the One True Linux: Is Linux Distro-hopping a Thing of the Past?” I don’t really know why there is a need to have a one true Linux Distro. The last thing Linux users need is a distro monopoly. There is good to having a variety of distros. Linux users need choices.

Damn Small Linux

Speaking of small, take a look at Damn Small Linux or DSL. The distro comes in a CD less than 50MB. DSL practically runs on memory gas fumes, a mere 128MB. DSL is also capable of running as a SSH, FTP and HTTP server. In addition, you will get a XMMS music player, Firefox browser and a host of other apps. Here’s a list:

XMMS (MP3, CD Music, and MPEG), Netrik web browser, FireFox, FTP client, Dillo web browser, spreadsheet, Sylpheed email, spellcheck (US English), a word-processor (Ted), three editors (Beaver, Vim, and Nano [Pico clone]), graphics editing and viewing (Xpaint, and xzgv), Xpdf (PDF Viewer), emelFM (file manager), Naim (AIM, ICQ, IRC), VNCviwer, Rdesktop, SSH/SCP server and client, DHCP client, PPP, PPPoE (ADSL), a web server, calculator, generic and GhostScript printer support, NFS, Fluxbox and JWM window managers, games, system monitoring apps, a host of command line tools, USB support, and pcmcia support, some wireless support.

Other Linux distros with small footprints are Puppy Linux, Tiny Core Linux, Antix, Vector Linux, SimpleLinux, etc.

Zenoss Open Source IT Management

Zenoss is a free and open source software for monitoring applications, networks, servers and much more. I haven’t heard of Zenoss until today when I saw it head the list of the Top 10 Open Source Server Technologies Need To Know. From Zenoss’ About page:

The Zenoss Core project was started by Erik Dahl, a long time network engineer who had used numerous commercial network monitoring systems. He was unimpressed with the state of systems management tools and frustrated by the fact that you need multiple tools to do availability monitoring, performance monitoring, event management and more. In 2005 Erik met up with former colleague Bill Karpovich and formed Zenoss, Inc. They soon released the first version of Zenoss Core on SourceForge under the GNU GPL (Version 2) for download. Since then Zenoss has been downloaded over 1 million times and is used on every continent.

If you are curious like I am, you can view the Zenoss screenshots and video tutorials that are available online. Better yet, you can download the software and start playing around with it. That’s the beauty of open-source. You get to test drive and install it right away. Visit Zenoss.

DMV Sucks

DMV Sucks. Big time. I was just there yesterday. Another unforgettable day. There is one thing I noticed, the people who work at the DMV are the unhappiest people on earth, because they either hate their job or love to treat people like dirt. Most likely both. If there is one government institution that loves to hire people who fail and suck at customer service, bet your money on the DMV. They will find and hire these people without fail. The M in DMV means Motor. It in this case, it should really be Moron, for the employees that work there. I hate most government workers with a passion, for a good reason, and especially those who work in the Department of Morons. You can sum them up as fat, lazy, uninspired and unmotivated. If you want a role model for your children, just tell them that it’s the opposite of a DMV employee. Unfortunately, these people are like super glue. You can’t pry them off the government payroll. They can’t get fired no matter how badly they do their jobs. Remind me again why we have the Department of Morons. Yearly car registration is just another way for government to fleece people out of their money.

Ok, my rant is over. Back to regular programming.

3-Column Black-Letterhead Theme

Introducing the 3-Column Black-Letterhead Theme with two right-handed sidebars. The theme is based on the original Black-Letterhead theme. To preview or download the theme, just click on the links below. Enjoy. If you have any questions, please send your questions to the Support Forum.

[download id=”9″]

Using Linux to Fix a Windows XP Patch

Apparently, there is a Windows XP patch that has gone awry. The patch has rendered a few Windows XP systems unbootable. Michael Horowitz from ComputerWorld suggested that Microsoft should use Linux to fix the booting issue. What a novel idea! Of course, Microsoft will never use Linux to fix Windows. That’s the reason why there hasn’t been any solution offered at the Microsoft Security Response Center the last four days.

Practically, most Linux distributions nowadays can boot from a Live CD, something Windows OS could not or will not do. You can even run Linux Live CD on a system with no internal hard drive. All you need is a little bit of memory and a CD player. You’re set to go.

The offending Windows XP patch is called KB977165. Here’s some detail from ComputerWorld:

The problematic patch is said to be KB977165. There are instructions online about backing out this patch using the Recovery Console. It doesn’t take much to adapt these instructions to Linux. Since Linux offers a friendly GUI, it’s arguably easier to use than the Recovery Console.

You can read more about the patch here.

Upgrade WordPress Using Subversion and Shell Script

Every couple of months or so, a new version of WordPress comes out. If you own a dozen blogs in your arsenal, you will need to upgrade each one of them. Thankfully, there is the automatic upgrade button available within WordPress. But still, you still have to login to each one of them and click on each button to upgrade WordPress. You wish there was an easy way to upgrade all 20 blogs with a single command.

Well, there is a simple solution with the help of Subversion and Shell Script. For several years, I have been using Subversion to upgrade WordPress. Each time there is a new version of WordPress, I just type in a single command to upgrade a dozen blogs or so. For the most part, it takes less than 30 seconds to upgrade a dozen of blogs.

Here is the simple Shell Script:

# A script to upgrade dozens of WordPress installs using Subversion.
echo “Upgrading blog 1cd /home/user/blog1.com/
svn switch $wpv
echo “Upgrading blog2.com”
cd /home/user/blog2.com/
svn switch $wpv
echo “Upgrading blog3.com”
cd /home/user/blog3.com/
svn switch $wpv

and so on….

If you have 20 blogs or so, you will need to include all 20 of them in one little script. You just need to change the “wpv” variable to point to the latest WordPress version. Once you made the change, and depending on the amount of files that has changed from one version to the next, the upgrade process can take anywhere from 10-30 seconds — that’s for 20 blogs!

For this script to work, you will need access to a web server that supports both Subversion and SSH. First, you need to install WordPress using Subversion. That can be easily done using the Subversion Checkout command. Once installed, you can create a simple Shell script like the one above, to execute the upgrade process. If your web host supports both, you might want to consider this little script when upgrading WordPress.