Saturday, December 30, 2006

Ugly fonts in GTK 1.2 Apps

In Ubuntu (and perhaps other distributions), the menus in GTK apps may have a huge, ugly, and nearly unreadable font.


To somewhat fix this, edit /etc/gtk/gtkrc.utf-8 and change the fontset definition.
style "default-text-better" {
fontset = "-bitstream-charter-medium-r-normal-*-*-100-*-*-p-*-iso8859-1,\
--bitstream-charter-medium-r-normal-*-*-100-*-*-p-*-iso8859-1"
}

class "GtkWidget" style "default-text-better"

This will fix the menus, at least.

Friday, December 29, 2006

Blogger Out of Beta

At long last, labels! Now posts can actually be categorized! The blog layout designer is very nice as well.

The suite of applications now offered by Google is amazing. They are all well written, simple, and user friendly. I have only two more wishes. The ability to back up account data, and public key encryption for GMail.

Friday, December 01, 2006

RubyGems Error

If you get this error when trying to install a gem:
/usr/local/lib/ruby/1.8/yaml.rb:133: [BUG] Segmentation fault

Run "gem environment" to find the "gem path" (i.e. /usr/local/lib/ruby/gems/1.8 ) and delete the "source_cache" file located in that directory.


Monday, November 13, 2006

Work Timer

I scratched an itch. Here's a simple task and time tracker written in Ruby.

Election Day Followup

It is great to be a cynic and have fears proven to be false.

Tuesday, November 07, 2006

Election Day

This is perhaps the most important day in recent memory. The results of today's election will affect the course of this nation and by proxy the world. Actually...one can only hope.

It is unfortunate that an opaque and untrustworthy voting system negates the democracy of the process. There are reports from Texas and Florida (go figure) about electronic voting systems switching Democratic votes to Republican. That's one hell of a bug, especially one-way. Not to mention that exit polling is not being done in many areas.

They say never to attribute malice to incompetence or stupidity...but yet again, cynicism colors my perception. I think it quite unlikely that the Democrats will win overall this election. Not that I particularly like the Democratic party, but the Republican party has done more to destroy the liberty of the American people than any of the enemies it has sworn to protect us from.

Monday, November 06, 2006

PHPMyAdmin Authentication Error

Error: PHPMyAdmin - Client does not support authentication protocol requested by server; consider upgrading MySQL client.
Explanation: The user's password is stored on the server in the new password format.
Solution: In the server MySQL console: set password for user@host = OLD_PASSWORD('the_password');

Sunday, November 05, 2006

Fedora Core 6

I decided to give Fedora Core 6 a go since I had to reinstall Linux anyway.

My First Thoughts:
  • Installation isn't too bad...much better than the slow Ubuntu LiveCD
  • I've got a lot of tweaking to do.
  • These icons are HORRID!
  • Where are my Nautilus bookmarks??? Where is the side panel???
I went the whole way and installed my entire toolset, here's to trying this out for a bit. My install notes are here.

Friday, November 03, 2006

Hard Lessons Learned...again

So yeah...I was trying to set up a VMWare virtual machine, and no matter what OS I tried to install, I would get errors. I poked around and noticed that a file in my /tmp directory was eating up ALL my disk space. A file with no owner...

Well, I can't delete it, so I go to single user mode...and still can't delete it. Oh joy!

Time to bust out the trusty Knoppix boot DVD. I run reiserfsck and find errors. Big surprise there. I run it again to fix and proceed to corrupt the partition even more. (Oh, by the way, this is my / partition, which is separate from my /home partition, thank god!!!). Of course the on-screen instructions DONT TELL YOU to --scan-whole-partition when you run reiserfsck --rebuild-tree ( it should be reiserfsck --scan-whole-partition --rebuild-tree /dev/hda1). So I proceeded to fubar my root partition beyond all recognition. Guess who didn't make backups???

I managed to clear space off my trusty 40GB IBM SCSI HD, and try to install Ubuntu Edgy Eft. 6 attempts later...I give up (due to some horrific installer bugs) and try Dapper Drake. I don't know what the hell is wrong with my box...but only the Xubuntu 6.06 installer worked. All the other installers hung at some point. Hey, maybe my RAM is bad. I'll start Memcheck before going to bed.

But anyway...my rant is coming to a close. Lesson learned...BACK UP YOUR SHIT. I had tweaked this box for almost 2 years running (thank you Debian/Ubuntu for in-place distro updates!) and I lost a LOT of config files...not to mention weeks of work logs, journal entries, and wiki entries stored in my /var/www folder.

Today sucked.

UPDATE: It was bad RAM.

Sunday, October 29, 2006

The Joke of Airline Security

From Wired:
Security researcher Christopher Soghoian created the Northwest Airline Boarding Pass Generator in the hope of spurring Congress to look closely at the nation's aviation security policies, which he calls "security theater."

The site lets anyone create a facsimile of a Northwest Airlines boarding pass, with whatever name they choose.

On Friday, Congress heard Soghoian's message loud and clear. But instead of promising to reform broken airport security procedures, Rep. Edward Markey (D- Massachusetts), a member of the House Homeland Security committee known for his defenses of privacy, wants the site shut down and Soghoian arrested.

A warrant was submitted, and the Feds broke down his door taking computers, etc. I guess it is a crime to point out that the emperor has no clothes. This "fake boarding pass generator" had nothing to do with computer security. Any 6 year old that can type on a keyboard could edit the HTML of an internet issued "boarding pass" and reprint it.

My point here is that the government really doesn't care about security. A state of fear is to be instilled in the populace, and limited token steps are taken to give the impression of security. Not only does this create a cycle of dependence on the powers that be for security, it is a slow path to the elimination of freedoms of the public and empowerment of the establishment.

Maybe I am just a cynic and see pretense and dissimulation in the place of stupidity, shortsightedness, and incompetence.

Saturday, October 28, 2006

Merchanthound.com

The Merchant Hound site is coming along quite nicely. Fun Ajax action, and very aggressive caching make for a fast enjoyable experience. I'd use the site myself if I bought anything online anymore. I am still working out some of the kinks in the page and database cache, so performance can be spotty at times, especially when I am committing changes for the day.

I fixed the XML product feeds today. They look beautiful on the Google feed reader.

Friday, October 27, 2006

Installing Java, the Ubuntu Way

sudo apt-get install fakeroot java-package java-common
fakeroot make-jpkg --full-name "My Name" --email "me@example.com"
sudo dpkg -i sun-j2re1.5_1.5.0+update05_i386.deb
sudo update-alternatives --config java

Italian Sausage Soup

Ingredients

  • 2lb. italian sausage
  • 1 onion sliced
  • 2 cans stewed tomatoes
  • 1 12oz can tomato sauce
  • 3 raw potatoes julienne sliced
  • 1 bag frozen vegetables (asian blend)
  • 1 tsp. basil
  • 3 tbs. parsley
  • 1/4 tsp. oregano
  • 1 tsp. onion salt
  • 1 tsp. sugar
  • 3 bay leaves

Directions

  1. Brown meat
  2. Combine ingredients in large pot
  3. Add water to 1 1/2 in. of top of pot.
  4. Bring to boil.
  5. Simmer covered for 45 min. to 1 hr.

Serves …a lot of food

Quotes

To announce that there must be no criticism of the president, or that we are to stand by the president right or wrong, is not only unpatriotic and servile, but is morally treasonable to the American public.
-Theodore Roosevelt

If Tyranny and Oppression come to this land, it will be in the guise of fighting a foreign enemy.

-James Madison

Thursday, October 26, 2006

Late Night Rambling

There is far too much information, and far too many ways of storing it. I have a local blog and wiki, for sake of data ownership, but I would like to push data to the wider net as well to give back.

Everything I could possibly care to know and more is available due to the work of others, and it is a small effort to return the favor.

Cannot Install any Ruby Gems

Problem: Error trying to install ANY gem.
Error Message:
ERROR: While executing gem … (Gem::GemNotFoundException)
Could not find rubyzip (> 0) in the repository
Solution: Delete source_cache file (run gem environment to find the Gems install location)

Rails Setup With Mongrel and Apache mod_proxy

I set up Apache to proxy requests to the 3 Mongrel servers providing blogging, wiki, and todo list functionality.


This setup is for local access only.



  • Create mongrel system group and user

  • Place Rails applications in /var/www/mongrel

  • chown -R mongrel:mongrel /var/www/mongrel

  • Create mongrel initscript: /etc/init.d/mongrel and symlink to /etc/rc2.d/S99mongrel


#!/bin/bash
case $1 in
start)
port="12000"
for appdir in `ls /var/www/mongrel`; do cd /var/www/mongrel/$appdir ; echo " * Starting $appdir on port $port."
mongrel_rails start -d -e production -p $port --user mongrel --group mongrel -a 127.0.0.1 ; port=`echo "$port + 1" | bc`
done
;;
stop)
for appdir in `ls /var/www/mongrel`; do cd /var/www/mongrel/$appdir ; echo -n " * Stopping $appdir..."
mongrel_rails stop ; done
;;
restart)
for appdir in `ls /var/www/mongrel`; do cd /var/www/mongrel/$appdir ; echo -n " * Restarting $appdir..."
mongrel_rails restart ; done
;;
esac


  • Start mongrel service and test

  • Add entries for 127.0.0.3 blog.localhost, 127.0.0.4 wiki.localhost, etc. to /etc/hosts

  • Enable mod_proxy (sudo a2enmod proxy)

  • Allow local proxy requests by modifying the /etc/apache2/mods-enabled/proxy.conf (Allow 127.0.0.0/255.255.255.0)

  • Add Listen 127.0.0.3:80, etc. to /etc/apache2/ports.conf

  • Create VirtualHosts entries for the servers in a new sites-enabled file (I used proxy)


NameVirtualHost wiki.localhost:80
<VirtualHost wiki.localhost:80>
<Directory "/">
Order allow,deny
Allow from all
</Directory>
ProxyPass / http://localhost:12000/
</VirtualHost>


  • Restart Apache