Wednesday, April 13, 2011

Shito Ryu Itosu Kai

A funny thing happened on the way to the dojo....

As a stereotypical sysadmin (middle aged and overweight) I always hated the thought of exercise for exercise's sake. I did enjoy playing some sports like baseball but I have almost zero athletic talent, so as I got older I was really slowing down - especially since none of it came naturally.

A friend called our family in the fall of 2010 asking if any of our sons would be interested in learning karate. The price was more than reasonable, and the dojo less than 10 minutes from our door. So my wife and I took the older two (6 and 8 at the time) out to watch a class. Not only did our older son think it looked like fun, I was hooked too. We decided we'd both try it together for moral support.

It's not a sport - there's no keeping score. It's not religious, and you might miss the philosophical nature of it entirely if you aren't paying attention, although you'll get it by osmosis if no other way. To me it's about self improvement - both physically and to my surprise mentally too.

I've been at it for about six months now. I haven't lost any weight to speak of, but my balance, flexibility and endurance are all way way way better. I always thought those people that complained about feeling lousy because they missed a workout were either full of it or showing off - now I'm starting to see what they mean. At the end of the night I'm usually physically exhausted, and happy, and the happy part carries through the next day, while the exhausted part doesn't (minus a few achy bits :-)

Completely ignore the movies about martial arts. OK, scratch that. Enjoy the martial arts movies if you're into that stuff - just remember they're as true to life as Middle Earth or WoW is to your neighbourhood. If there are two physical activities that should suit a sysadmin - karate and curling have got to be it. It's not just dumb muscle memory, or fast twitch reflexes. You have to use your head and control your muscles. Technique is king, and brute force a distant pawn at best.

Any karate class worth attending welcomes newbies, expects you to be terrible, and just wants you to respect tradition and try hard. Talent or physical fitness is not required. You owe it to yourself to find one and ask if you can watch one night.

This was a long winded way of introducing the next bunch of posts on kata, which probably still won't make any sense, but hey, it's my blog right? :-)

Tuesday, April 12, 2011

And Now For Something Completely Different

As you can plainly see, tech content here has been pretty few and far between lately.

It's somewhat amusing (or tragic, or both) that I've somehow ended up the admin of a completely MS based domain - PCs, servers, applications and all.

I could bitch and whine and moan and complain (and sometimes I still do, but quietly :-), but I decided I'd be healthier and happier if I took it as a challenge to best rather than a cross to bear. And hey, I got a raise to go along with it, so it's not all bad.

Also on the bright side, what system admin doesn't love playing with new and shiny stuff, and the chance to replace literally everything but the monitors and printers? So hey, I'm trying to be positive, and I do have to admit, not all this MS stuff is terrible. Group policy is kinda cool even - just don't get me started on DFSR :-(

No, I'm not killing the blog - I'm just, um, refocusing :-) I still intend on having tech stuff here, I'm just very busy at the moment. In the mean time I'm throwing up some posts that are more personal memos than information for the world at large about my new found passion - karate. Feel free to blow right by the next couple of posts if that doesn't interest you - or drop me an email to whine if you prefer - I just don't promise to listen :-)

Monday, November 15, 2010

Migrating Email From Apple Mail to Windows Live Mail

Yes, some people really do leave Apple for Microsoft...

This applies only to Apple Mail found in Leopard and Snow Leopard - earlier versions store and handle mail differently.

  1. create mbox2eml.pl, and put it on your $PATH
  2. #!/usr/bin/perl -w

    # Copyright (C) 2009 Josh A. Beam
    #
    # Permission to use, copy, modify, and/or distribute this software for any
    # purpose with or without fee is hereby granted, provided that the above
    # copyright notice and this permission notice appear in all copies.
    #
    # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
    # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
    # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
    # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
    # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
    # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
    # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

    # mbox2eml.pl (last modified July 14, 2009)
    # This Perl script creates separate .eml files for each email message in
    # a given mbox file. The .eml files are created in the directory that the
    # script is run from and each file is named according to the position of
    # the message in the mbox file (for example, "1.eml" for the first message).

    use strict;

    # make sure an mbox filename was given
    if($#ARGV != 0) {
    print STDERR "Usage: $0 \n";
    exit(1);
    }

    # open mbox file
    open MBOX, $ARGV[0] or die "Unable to open mbox file\n";

    # loop through each line from mbox file
    my $fileCount = 0;
    my $blankLineCount = 2;
    while(my $line = )
    {
    chomp($line);
    $line =~ s/\r//g;

    # check for the start of a new message
    if($blankLineCount >= 1 && $line =~ /^From /) {
    # open new eml file
    close EML;
    open EML, ">" . ++$fileCount . ".eml";

    print "Saving " . $fileCount . ".eml\r";
    } else {
    # write line to file
    print EML $line . "\n";
    }

    # check for blank lines
    if($line eq "") {
    ++$blankLineCount;
    } else {
    $blankLineCount = 0;
    }
    }

    # close files
    close EML;
    close MBOX;

    print "Saved " . $fileCount . " files\n";

  3. mkdir ~/someFolder
  4. cd ~/Library/Mail
  5. find . -type d -iname '*.mbox' -exec cp -R "{}" ~/someFolder/ \;
  6. cd ~/someFolder
  7. for directory in *.mbox ; do mkdir "${directory}-email" ; done
  8. for directory in *.mbox ; do mbox2eml.pl "${directory}/mbox" ; mv -v *.eml "${directory}-email" ; done
  9. rm -rf *.mbox
  10. Copy someFolder to the Windows computer
  11. Run File -> Import from Windows Live Mail - choose Live Mail format when asked