| < | July 2004 | > | ||||
| Su | Mo | Tu | We | Th | Fr | Sa |
| 1 | 2 | 3 | ||||
| 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| 11 | 12 | 13 | 14 | 15 | 16 | 17 |
| 18 | 19 | 20 | 21 | 22 | 23 | 24 |
| 25 | 26 | 27 | 28 | 29 | 30 | 31 |
We got back from our mini-vacation a couple of days ago, and today I finished uploading all of the photos to the web server. They have been organized into four different albums, corresponding to different locations where the pictures were taken during the trip: Monterey, Highway 1, San Mateo and San Francisco. Enjoy!
It's been quiet around here for the last week or so because I went out of town to visit my brother's family up in the Bay area, as well as good friends in Monterey. This was a non-surfing vacation, so you can bet that I was jonesing to get back into the water today, ASAP. The waves were mediocre, but the water was very nice and it was great to get wet again.
When I got home last night, I was pleasantly surprised to hear that my new thruster was done, and would be ready for pickup that evening. It is shaped by Brain Bulkley, and is 6'4" x 19&1/2" x 2&5/8". Here are the necessary new board, pre-ding pictures:
When logging onto my Gmail account today, I noticed a new, highlighted link near the top of the screen titled “New Features!”. After investigating these new features, I discovered that Gmail now allows you to import contact information via an uploaded CSV (comma seperated value) file. Great!
I use Evolution on my Gnome Linux desktop to manage my email and contacts. Looking through the various menus, I realized that there is no way (which I could see) to export my contacts file to a CSV file. Ug! However, since Evolution is Open Source software, that meant that the file format for the address database was not proprietary, and hence that someone else out there had probably already solved this problem. So, doing a Google search for exporting evolution contacts to CSV files, and I stumble upon this page which provides a python and perl script to accomplish the task. I downloaded the scripts and crossed my fingers...
Hmmmm. No joy. It was time to get my hands a bit dirty and mingle with the code, to try and figure out what was going on. The python script worked fine once I made sure that /usr/env/python2 pointed to the latest version of python installed on my system (version 2.3) instead of version 2.0, which it was stuck on. It turns out that Evolution stores the contact information using the Berkely DB (version 7) format. The python script opens up the evolution contact database (addressbook.db), and then outputs the contact information in VCARD format to standard output.
Here is the python script, named exportevolution.py:
#!/usr/bin/python2
import bsddb, os, re
home = os.getenv('HOME')
# This is the only variable you should change. If you do not know the
# location of your evloution address book, use `locate addressbook.db`
# to find it
dbname = '%s/evolution/local/Contacts/addressbook.db' % home
db = bsddb.hashopen(dbname)
for k in db.keys():
for line in db[k].split('\n'):
print line
db.close()
Once I had the python script working, the perl script was next on software TO-DO list. The perl script takes input from standard input, and parses the lines fed to it looking for specific VCARD tags which evolution uses. It then interprets these tags, and output them in a CSV format. Sort of. After quickly acquainting myself with basic Perl, I dove into the script, generalizing it by adding constants to specify the separator for each field, and adding quotes around each field. I cleaned up a few other small problems so that it would work in Perl's strict mode, and tested it out. Success!
Here is the perl script, named vcard2csv.pl:
#!/usr/bin/perl
use strict;
my $begin;
my $end;
my $quo;
my $sep;
my $line;
my $name;
my $tel_work_voice;
my $tel_work_fax;
my $tel_home;
my $tel_pager;
my $tel_cell;
my $tel_voice;
my $email;
# initialize constants
$begin = "BEGIN:VCARD";
$end = "END:VCARD";
$quo = '"';
$sep = ",";
# print out the header for the CSV file
print $quo . "Name" . $quo . $sep;
print $quo . "Work - Voice".$quo . $sep;
print $quo . "Work - Fax".$quo . $sep;
print $quo . "Home".$quo . $sep;
print $quo . "Pager".$quo . $sep;
print $quo . "Cell".$quo . $sep;
print $quo . "Voice".$quo . $sep;
print $quo . "E-mail".$quo;
print "\n";
while ( $line = <STDIN> ) {
chomp ($line);
chop ($line) ; # trailing ^M
#BEGIN:VCARD
if ( $line eq $begin ) {
$name = "";
$tel_work_voice = "";
$tel_work_fax = "";
$tel_home = "";
$tel_pager = "";
$tel_cell = "";
$tel_voice = "";
$email = "";
}
#X-EVOLUTION-FILE-AS:
if ( $line =~ /^X-EVOLUTION-FILE-AS\:.*/ ) {
$line =~ s/^X-EVOLUTION-FILE-AS://g;
$name = $line;
print $quo . $name . $quo . $sep;
}
#TEL;WORK;VOICE;
if ( $line =~ /^TEL;WORK;VOICE:.*/ ) {
$line =~ s/^TEL;WORK;VOICE://g;
$tel_work_voice = $line;
}
#TEL;WORK;FAX;
if ( $line =~ /^TEL;WORK;FAX:.*/ ) {
$line =~ s/^TEL;WORK;FAX://g;
$tel_work_fax = $line;
}
#TEL;HOME;
if ( $line =~ /^TEL;HOME:.*/ ) {
$line =~ s/^TEL;HOME://g;
$tel_home = $line;
}
#TEL;PAGER;
if ( $line =~ /^TEL;PAGER:.*/ ) {
$line =~ s/^TEL;PAGER://g;
$tel_pager = $line;
}
#TEL;CELL;
if ( $line =~ /^TEL;CELL:.*/ ) {
$line =~ s/^TEL;CELL://g;
$tel_cell = $line;
}
#TEL;VOICE;
if ( $line =~ /^TEL;VOICE:.*/ ) {
$line =~ s/^TEL;VOICE://g;
$tel_voice = $line;
}
#EMAIL;INTERNET;
if ( $line =~ /^EMAIL;INTERNET:.*/ ) {
$line =~ s/^EMAIL;INTERNET://g;
$email = $email . $line;
}
#EMAIL;QUOTED-PRINTABLE;INTERNET;
if ( $line =~ /^EMAIL;QUOTED-PRINTABLE;INTERNET:.*/ ) {
$line =~ s/^EMAIL;QUOTED-PRINTABLE;INTERNET://g;
$line =~ s/=0A/ /g; #=0A make it a space
$email = $email . $line;
}
#END:VCARD
if ( $line eq $end ) {
if ( $tel_work_voice eq "" )
{ print $sep;}
else
{ print $quo . $tel_work_voice . $quo . $sep; }
if ( $tel_work_fax eq "" )
{ print $sep; }
else
{print $quo . $tel_work_fax . $quo . $sep; }
if ( $tel_home eq "" )
{ print $sep; }
else
{ print $quo . $tel_home . $quo . $sep; }
if ( $tel_pager eq "" )
{ print $sep; }
else { print $quo . $tel_pager . $quo . $sep; }
if ( $tel_cell eq "" )
{ print $sep; }
else { print $quo . $tel_cell . $quo . $sep; }
if ( $tel_voice eq "" )
{ print $sep; }
else
{ print $quo . $tel_voice . $quo . $sep; }
if ( $email eq "" )
{print $sep;}
else { print $quo . $email . $quo; }
print "\n";
} # end if "END:VCARD"
} # end while STDIN
Note that I also added a header line for the CSV file, which Gmail seems to expect.
To use the above two scripts, copy and paste each of them into their own file, named exportevolution.py and vcard2csv.pl. Make sure the executable bit is set so that your Linux / BSD / Unix OS will allow you to treat them as executable scripts via:
chmod a+x exportevolution.py vcard2csv.pl
Next, pipe the output from out evolution exporter to the vcard to csv converter, and save it to a suitably named file:
./exportevolution.py | ./vcard2csv.ple > mycontacts.csv
Finally, log into your Gmail account, click on the Contacts link at the upper right hand side of the page, and then import the mycontacts.csv file using the import link Gmail provides. Enjoy!
Jul 21, 2004 14:15 | [ computers ] | # | G | Comments (12)Finally, Souther California has been visited by some good surf. Sunday morning I paddled out at Oceanside, hoping to catch the swell on the rise. While the sets initially were fairly large and meaty, when the tide changed the waves pretty much shut down. After paddling my ares off for 2 hours, I called it a morning and made my way back home. That night, my shoulders were as sore as I can remember.
I went out to my favorite reef break Monday morning, and although the waves I did catch were fun, conditions were a bit inconsistent and the swell still hadn't shown up in full force. Similar conditions were in store for the lunch break surf.
Giving my shoulders a break this AM, I decided to only head out on my lunch. What a day! The waves were large, peaky, and glassy. I dropped in on a few large lefts, air dropping into the biggest of the day. Duck diving one wave, my board slipped from my grasp and bashed the hell out of my right shin. Knowing that it may be quite some time until I get to surf waves like I was right now, I stayed out and had a great time. My shin lost a few layers of skin and has a nice sized goose-egg and bruise forming. No biggie - it was worth it!
Jul 20, 2004 15:42 | [ surf ] | # | G | Comments (0)Waking up at 4:30am this morning (with no alarm set!), I decided that it was a sign that I should get up and hit the water. The ocean was glassy and the set waves were decent, if a bit inconsistent. I caught a few fun waves and then headed into work.
This afternoon, the conditions for the lunch break surf were similar to this morning - inconsistent, peaky, yet remarkably glassy. And the sun was out and making it real difficult to head back in for work.
Hopefully we will pick up a bit of a South swell due to a tropical storm off the southern portion of Baja California. I could use some juiced up waves instead of the gutless surf we've had for the last 4 weeks or so!
Jul 13, 2004 15:57 | [ surf ] | # | G | Comments (0)Last weekend, we had family down to just get together and enjoy the weather, and the water. Lots of fun and sun combined with good food and great company results in an awesome day! The Pool Party Photo Album is up and ready for viewing.
Jul 13, 2004 15:53 | [ photos/2004-07 ] | # | G | Comments (0)The Register has a great story on the Anatomy of a 419 Scam. The 419 scam is most commonly known as the Nigerian Email scam, which most people have run across in their INBOX at one time or another. The initial contact email usually tells the receiver that they may be in line to inherit X million dollars, as someone has died and left no heirs. The catch, of course, is that you'll need to send them X thousand dollars to establish a bank account into which these funds will (never) be deposited.
This article illustrates a variation on this theme, and comes complete with the emails sent to the mark, as well as his responses. The result is, of course, not good. Furthermore, the article goes on to illustrate why these scams are so popular - because they work, and law enforcement doesn't seem to want to do much about them.
Jul 12, 2004 10:30 | [ computers ] | # | G | Comments (0)As reported here earlier, Eclipse 3.0 was recently released to the computing public. While Eclipse is viewed primarilly as an integrated development environment for the Java programming language, it is actually far more flexible. The Eclipse Foundation has positioned Eclipse as a general purpose IDE, where plugins for each supported language are needed to cater to the language's specific needs. Therefore, the Java IDE is a separate package from Eclipse, etc.
To develop in Python with Eclipse, read through this article, from the folks at IBM developerworks. It discusses how to download and install the Python IDE plugin, and then goes over some of its features. Very cool!
Jul 12, 2004 10:14 | [ computers/programming/python ] | # | G | Comments (0)Turn 8 starts out favorably enough for the DRV, with an AAA ambush on the deck random event roll. Fortunately for the US, all flights on the deck are in rough hexes, so the random event is ignored.
During the US detection phase, THAN TRUNG manages to remain undetected, despite two visual sighting chanes from nearby F-4 flights. So far, things are looking up for the DRV this turn! During the DRV detection phase, US Flight 101 is detected! Perfect! It looks as if THAN TRUNG might have a chance to intercept this flight, and hopefully neuter its strike capability.
The first US movement phase then finds the three strike flights punching the afterburnings, and climbing towards their strike altitude. As US flight 105 moves its final movement point, SAM site B fires on it. The SAM misses the flight, and the pilots keep their cool and decide they don't need to perform any avoidance maneuvers. SAM site A then fires a long range shot at flight 105, hoping to discourage it into turning back. While the SAM shot is a miss, it appears as if the pilots of flight 105 thought the shot was closer than they liked. They perform a SAM avoidance maneuver, jettisoning their ordnance, they dive to the NW, and break out of formation!
During the DRV movement phase, THAN TRUNG lights up his afterburners to try and catch the tail end charlie strike flight (101), and do his best. He makes a perfect intercept approach, and bounces flight 101, who is completely surprised to notice tracers arcing about their planes. However, THAN TRUNG misses both shots on flight 101 (4 F-105Ds) and blows all of their ammo on the effort. The F-105s do not get to return fire, being severly outmaneuverd while laden with ordnance by the Mig-17s. Although no F-105s are shot down, they still jettison their ordnance, so it is a mission kill for THAN TRUNG. During the post combat procedure, both flights involved in the combat suffer aggression penalties, and are disorderd.
Finally, since there was another flight in the strike mission, it must now check for MiG panic. Amazingly, the only remaining flight in the strike package fails its MiG Panic roll, gets spooked by the attack on it companion flight, and jettisons its ordnance to get the heck out of dodge!
Well, Turn 8 was certainly a good one for the DRV. At this point in the game, with no strike flights remaining, Allan C. agrees to concede the game. Luck certainly played a roll in this scenario, and it could have progressed very differently had a few key rolls gone the opposite way. For my part, it was a very tense game. Several times, I thought that I would be completely hosed, but somehow things managed to work out just the right way for me.
Here are links for the cyberboard game file for scenario D1 and end of game map.
Finally, I'd like to thank Allan Cannamore for another great game. This is our second game as opponents, and he is as wily as they come. Keeping his strike package on the deck and in the rough until late in their flight path was a great strategy that prevented me from detecting them until much later. I look forward to our next game!
I hope you all enjoyed reading the turn postings from my point of view, and that it gave you a decent insight as to what I was thinking along the way. Please post any thoughts, comments, or praise here! I'd love to get some feedback on the scenario, and it is awfully quiet around here. If I get some feedback, then I'll most likely do this again the with next PBEM game I play.
Jul 08, 2004 10:26 | [ games/board/downtown ] | # | G | Comments (0)I know that it is now called the San Diego County Fair, but old habbits die hard. I have just added a new album to the website, containing pictures from our family outing to the Del Mar Fair. Many a fried food was consumed, and the kids had a great time riding the rides and seeing / petting the various animals on display. It was a gorgeous day out, and a great way to spend one day of the holiday weekend!
Jul 07, 2004 10:26 | [ photos/2004-07 ] | # | G | Comments (0)The Eclipse Foundation has released version 3.0 of the Eclipse IDE. This release debuts run-time binary compilations of the IDE for increased performance, as well as all kinds of new features. Download it and be merry!
Once you've downloaded and installed the new version, try your hand at CodeRuler, a graphical simulator designed to exercise your Java programming skills. Download CodeRuler here.
Jul 02, 2004 14:41 | [ computers/programming/java ] | # | G | Comments (0)During the detection phase, a US flight visually spots my flight of 2 Mig-17F's. The sneaking and skulking about on the deck bought us some time, but not quite enough to get to the strike package. Ug. The DRV detect the lead flight (#105) in the strike package, which is a good start. That means that this turn I'll be able to try and acquire the flight with very good odds of success!
During the movement phase, flight 202 skirts the Hanoi AAA defenses, and comes out unscathed. Those boys are blessed, I tell you! SAM sites E and F both fire their remaining missiles at 202, with SAM site F almost scoring a hit on the wily pilots. Sam sites E & F are now depleted of all missiles.
Then, Flight 205 swoops down on the newly detected THAN TRUNG flight, and engages it! THAN TRUNG is surprised, and US flight OLDS (revealed to b2xF4-C) pounces on the DRV flight, getting off 2 shots which THAN TRUNG somehow manages to avoid. THAN TRUNG does not get to return fire, probably happy to just bug out and still be alive. OLDS flight has depleted all of it's radar homing missiles (RHM), and both flights scatter from the dogfight hex, with THAN TRUNG becoming undetected again due to the confusion of air combat.
During my movement phase, THAN TRUNG hits the burners, stays on the deck, and finds cover just over the tree tops of some rough jungle terrain. He's still in a decent position to try and intercept the tail end of the strike package, *if* he can stay undetected for the next turn or two.
The remaining US flights then make their moves. Flights 204 and 305 surround THAN TRUNG, hoping to bounce him next turn if he is detected. SAM site C salvo fires two SAMs at flight 204, but misses. The three US strike flights make their way towards my hidden Medium AAA and Fire Can. They may have a nasty surprise waiting for them...
During the SAM Acquisition phase, SAM sites A and B both try and acquire flight 105, the lead flight of the three flight strike package. A gets a partial acquisition while B locks on fully. Very nice! Finally, in the Admin phase I turn off those SAM sites which have been depleted of all of their ammunition.
Here are links for the cyberboard game file for scenario D1 and end of turn 7 map.
Jul 01, 2004 13:15 | [ games/board/downtown ] | # | G | Comments (0)