Pages

Monday, April 28, 2003

site updates

There are a lot of changes going on around here.

First, you might notice that going to webmages.com now takes you straight to my page. A seperate index really isn't required anymore.

Secondly, I've added a bunch of links from the old index to my links page.

Also you'll note there's no more email link. I've removed this in hopes that it may help stem the tide of spam I receive. In it's place will be a form that will allow you to send me an email through the site if you don't already know my email address.

Lastly, an update on the progress towards a source code release. I realize that I've been really, really bad about this in the past. And I'm being bad about it again. It's really hard to justify taking the time to pull out my passwords, dump the database structures, and write the documentation for a release — especially considering that the site isn't finished yet. But rest assured, it will be finished in the not too distant future. I only have 2 things left — my own image gallery, which I have already made great progress on, and a comments system that will work for both the blog and image gallery.

Sunday, April 27, 2003

more wine and fun

Bonnie and I had a very fun (and busy) weekend. On Friday we went out for a drive around the Westcreek Office Park. It looks like it's going to be really nice, and there's a small chance I could wind up working there. Which would be really great since the building I would be in is less that 10 minutes from the townhouse! It would be so awesome to go home for lunch.

On Saturday we did a bunch of shopping, and went for a walk on the Canal Walk, and even took the little historical boat ride on the Kanawa Canal. Afterwards we had supper at Sine, and Irish pub in Shockoe Slip. It was a really great day, not too hot, not too cold, a bit humid but tolerable.

Today (Sunday), after church, we picked up my friend Kelley and went out to the wine festival at the Boulders over on SouthSide. It was ok, and Bonnie bought me a Aussie leather hat... it's very cool. :) It was a bit too warm and sunny though, and the massive throngs of people in attendance combined with the stench of horse manure everywhere (we couldn't find where it came from, but boy did it sure stink) did make it less than ideal.

All-in-all a fun and active weekend. Next weekend we're planning on going to the Cinco de Mayo festival out on Brown's Island on Saturday, and on Sunday I'm flying to Dallas for a few days for work.

On the plus side, I'll get to visit my soon-to-be inlaws since they live in the Dallas area! They really are terrific people, and I can't wait to see them!

Thursday, April 17, 2003

my mom’s ok

My mother had major back surgery today. I'm pleased to report that she made it out of surgery just fine. She seems to be doing well, and first indications are that the surgery was a success. She's got a long road ahead, but hopefully this will relieve her pain and she'll be able to get about better.

Thanks to everyone for your prayers and support!

Tuesday, April 15, 2003

move-ing and wine-ing

After many, many, days my old apartment is finally cleaned out, and cleaned up. It was a lot of work and took forever. I still have to drop off the key, but that's about it.

One of the last things I did was bottle the Strawberry White Merlot that I made for Bonnie. It's not the best wine ever, but it's light and fruity which is the kind of thing she likes. :)

I needed some bottles and stuff, so a trip to the weekend brewer for supplies was in order.

Judging from my previous bottling experience I assumed this was going to take about 3 hours to complete (it took about 2 hours with 2 people the first time I bottled).

I was soooo wrong. And in a good way! With my supplies I also got one of the new Buon Vino Super Automatic Bottle Fillers. Let me tell you, it worked like a dream. I was able to bottle and cork at the same time (it shuts off automatically when the bottle is full), and I didn't spill a drop (it has an overflow tube that conveniently goes into another bottle)! It only took me about 45 minutes to bottle and cork the whole 6 gal. carboy! (not including santization time).

Another nifty gadget I picked up is a CO2 cartridge gun, and a 2 liter bottle topper from Liquid Bread, the Cabonator. It allows you to carbonate any liquid in a 2 liter bottle (it apparently works with even 20oz bottles too!), so Bonnie can have her Strawberry Mist in sparkling fashion if she wants. It also means no more flat sodas!! :)

Tuesday, April 08, 2003

osx screenshots (in png)

With OSX Jaguar, it's pretty easy to take a screenshot using the screencapture command line utility, for example:

screencapture -x desktop.pdf

The only problem is that it's in pdf format. In previous versions of OSX it was possible to change this format, but it appears that this functionality is lost in Jaguar. Ok. So I want to display this on the web. We need to get it into a more common compressed format that will load directly in a browser.

I've been familiar with and used the ImageMagick convert program for some time, so I decided to download their Darwin binaries and give them a shot. It took a bit of hassel, but it worked.

First I tried expanding the archive under /usr/local/. No matter what I did with setting environment variables it kept saying it couldn't find files in /ImageMagick-5.5.6/lib/. Ok, I gave up and moved it from /usr/local/ to /. I set the PATH to include /ImageMagick-5.5.6/bin, and set MAGICK_HOME to /ImageMagick-5.5.6/. The convert command line utility now actually responds usefully.

Yay! ..... Not.

I try and run "convert desktop.pdf desktop.png". Arg! No! It doesn't work!

Unrecoverable error: rangecheck in .putdeviceprops
convert: Postscript delegate failed

What to do. I check out pdf* on my system and notice that there's a pdf2ps program, which converts the pdf document to a postscript document. It works, and produces desktop.ps. Will convert work on the postscript file?

Yes! "convert desktop.ps desktop.png" results in a valid png file!! Yay!

Now all that's needed is a script to put it all together right? WRONG. The size of the file that was output was way too small. It turns out that when the display is dimmed in sleep mode, you get a solid black image. I stumbled upon a simple program, undim that can take care of this for you on the command line. I put mine in /usr/local/bin

Lastly, you probably don't want a screenshot of your screen saver, so you'll need a tidbit of a command line to turn it off:

kill `ps -caxwwopid,command | grep ScreenSaverEngin | cut -b 1-6`

Finally we come to the script:

#!/bin/bash
PATH=$PATH:/ImageMagick-5.5.6/bin:/usr/local/bin
MAGICK_HOME=/ImageMagick-5.5.6/
export PATH
export MAGICK_HOME
cd ~/Sites
undim > /dev/null
kill `ps -caxwwopid,command | grep ScreenSaverEngin | cut -b 1-6`
screencapture -x desktop.pdf
pdf2ps desktop.pdf
convert desktop.ps desktop.png
rm desktop.pdf
rm desktop.ps

Monday, April 07, 2003

finally done!

Almost anyway. I now have an administrative backend for my blog! It's pretty simple to use and allows me to add/delete/hide/modify entries quickly and easily. I do have some HTML clean-up work to do on it, as well as some code modularization to do. I should be able to get it done this week.

Although I still have some things left to do, like an admin for the poetry and links sections, rss feed, and my own custom image gallery, I think I'll be doing my first source code release this weekend, probably 0.01.

Saturday, April 05, 2003

cherries

Bonnie and I did indeed go to the Cherry Blossom festival yesterday. It was a really fun time, although something of an adventure.

For anyone who doesn't know... WARNING!!! D.C. is divided into quadrants, with numbered streets (First St., Second St., and so on) running North/South and lettered streets (A St., B St., and so on) that run parallel East/West. The really confusing thing is that there are two first streets! One on the Eastern side of the Capital, one on the Western side, same for A St., one on the North, and one on the South. It makes for an easy to follow system if you know about it. The problem is when you don't know about it.

We got there early to see the parade. We got off at the Armory-Stadium stop, and started walking from what we thought was the end of the parade route (17th and Constitution) towards the beginning (7th and Constitution). We started getting more and more suspicious as we went along... there didn't seem to be any roads blocked off, no police presence, no crowds... It wasn't until 9th street that we fully realized the gravity of our mistake... we had started on the wrong 17th street, if we were to keep going we would run into the tail end of the parade in another 16 blocks! Ugh! So we wound up missing the parade.

Which, all things considered was probably a good thing. It turned out to be rather cold, when the weather forecast had a predicted high of 73 the night before. So when we finally reached the mall, where we saw the very tail end of the parade leave, we decided to go into the Smithsonian's Air and Space Museum. Cool, right? Nope. We had thought ahead and packed a light lunch and brought it with us. Turns out they won't let you into the museums with food or drink. So we ate our lunches at about 10am, in the cold, on the mall. Ugh again!

Finally, we got through security. We had quite a good time wandering around the museum. It's not my favorite of the Smithsonian's, but it's still very very cool. I mean, moon rocks. Moon rocks are just very cool. :)

Several hours later we emerged from the museum and went to the street festival. It was just awesome. All the food vendors, performers (we saw an amazing troupe from Okinawa perform a combination of dance and martial arts that was just outstanding), informational booths (oragami, bonsai, paper making, doll making, and many more), kareoke... it was a great experience. Probably my favorite thing was the shrimp dumplings...mmmmm.

We took a little side trip to Union Station, and then headed home. We got back 14 hours after we left, exhausted, feet aching, and happy as clams.

Oh, and yes, the trees were beautiful, some pictures will be up soon.

Thursday, April 03, 2003

site update

w00t! I have completed the calendar functionality on the right. It's not what I originally intended, but it only took me about 15 minutes to code. A DHTML calendar would have been a huge PITA. Basically I'm looping over all the months between the first and last entries, and if there are entries in that month then I grab the count from the database and display the link.

The really cool part is what I'm doing with the URLs. I started with a method to make dynamic URLs more search engine friendly by replacing the /index.php?variable=4.2003 with /index.php/4.2003. Since I'm only passing a single variable, and it's in a specific format, it is pretty easy to do this and check for the validity of the variable passed.

The code looks a little bit like this:

$variable = $HTTP_SERVER_VARS['PATH_INFO'];
$variable = substr($variable,1);
$variable = rawurldecode($variable);
$variable = htmlentities($variable,1);
list($month,$year) = explode(".",$variable);

Well, that just wasn't good enough for me. I didn't want to have the /index.php at all. So I turned to Apache's mod_rewrite for help. A simple set of statements added to my .htaccess took care of it for me.

RewriteEngine on
RewriteRule ^([1-9].200[2-9]) index.php/$1
RewriteRule ^([0-1][0-2].200[2-9]) index.php/$1

With that done, we've gone from:
/index.php?variable=4.2003
to
/index.php/4.2003
to
/4.2003

Pretty cool huh?

here i am

No folks, I have not disappeared off the face of the planet.



Bonnie and I are probably going to take this Saturday off and head up to D.C. for the Cherry Blossom Festival. Did you know the trees were a gift to the United States from Japan in 1912? I personally find it amazing that they are still standing after World War II. But anyway, it looks like a fun time, it should be positively beautiful, and we both really need the break from our daily grinds.

I want to touch on changes to my site real quick. If this page doesn't look good, chances are you are using an old web browser. Basically you need a browser with solid CSS1 and good CSS2 support. It would also help if you would install the free silkscreen font. I've removed the archive links for now, and will be adding an archive calendar soon.