Monthly Archives: August 2006

Take a deep breath

Bruce Schneier is a very smart man. He is one of the people who wrote some of the basic security features of the internet. These days, he is an expert on security and security related technology. He had an interesting blog post yesterday. It says in part:

I'd like everyone to take a deep breath and listen for a minute.

The point of terrorism is to cause terror, sometimes to further a political goal and sometimes out of sheer hatred. The people terrorists kill are not the targets; they are collateral damage. And blowing up planes, trains, markets or buses is not the goal; those are just tactics. The real targets of terrorism are the rest of us: the billions of us who are not killed but are terrorized because of the killing. The real point of terrorism is not the act itself, but our reaction to the act.

The entire post can be found here.

Continue reading

Advertisements
Posted in Blessings

My public key

Trust and privacy are important. If you need my public key, you can find it here.

For more information about how this kind of encryption works, see this Wikipedia article.

Continue reading

Posted in Uncategorized

KEXP Desktop Sidebar gadget

I wrote a Google Desktop sidebar gadget. It shows the last three songs played on KEXP. You can browse the subversion repository here.

Downlaod the .gg file here.

Continue reading

Posted in Picture

26 weeks and growing

Ok everyone!  I can attest that I really do look better than the pic below.  However, I realize just how much bigger I am getting once I am on film.  Uggh!  

I feel absolutley great, but very hot these days.  I had my check up with my doctor on Tuesday ( the day of the pic below ) and he said I was doing everything right and I was progressing just fine.  He said my weight gain of 12.5 pounds was perfect and my blood pressure of 110/80 was ideal.  I was am so surprised each time I weigh in because I feel as big as a house!  I am getting tired of work, though.  At the end of each 12 hr shift, I am very swollen and very uncomfortable.  Overall, I am so pleased at how pleasant this pregnancy has been thus far.  I am aware and also prepared for the third trimester though. 

 I definitley have missed my massages.  After my doctor's visit on Tues., I went and got a pregnancy massage.  It was absolute heaven.  I had forgotten how tired your muscles get.  I always come home and thank Will for allowing me to get these massages.  Have I mentioned how wonderful my husband is?! 

Continue reading

Posted in Uncategorized

Previous / Next photo brower, a la Flickr

I wrote some code that can be put in a block to show previous / next photos like flickr does. Check it out here.

  1. Upload these two photos somewhere on your site. They show the first and last pictures:
  2. Create a ‘PHP code’ block with the following code:

    $nid));

    $previous=0;
    $next=0;
    $tmp_prev=-1;
    $terms = taxonomy_node_get_terms_by_vocabulary($node->nid, _image_gallery_get_vid());
    if ($terms) {
    $term = array_pop($terms);
    $res = db_query("SELECT n.nid FROM {term_node} t INNER JOIN {node} n ON t.nid=n.nid WHERE n.status=1 AND n.type='image' AND t.tid=%d ORDER BY n.sticky DESC, n.created DESC", $term->tid);

    $tot_num = db_num_rows($res);
    for($i=0; $i nid)) {
    $previous=$tmp_prev;
    }
    $tmp_prev=$nidvalue;
    }

    $prev_node = node_load(array('nid' => $previous));
    $next_node = node_load(array('nid' => $next));

    $prev_th = ($previous == -1) ? '' : l(image_display($prev_node, 'thumbnail', array('width' => '120', 'height' => '120')),'node/'.$prev_node->nid, array(), null, null, FALSE, TRUE);
    $next_th = ($next == 0) ? '' : l(image_display($next_node, 'thumbnail', array('width' => '120', 'height' => '120')),'node/'.$next_node->nid, array(), null, null, FALSE, TRUE);
    $output = '';
    $output .= '

    ';
    $output .= '

    ';
    $output .= '

    ';
    $output .= '

    ';
    $output .= '

    ';

    $output .= '

    ' . $prev_th . '
    ' . (($previous == -1) ? ' ' : l('Previous','node/'.$prev_node->nid, array(), null, null, FALSE, FALSE)) . '
    ' . $next_th . '
    ' . (($next == -1) ? ' ' : l('Next','node/'.$next_node->nid, array(), null, null, FALSE, FALSE)) . '
    ' . $tot_num . ' photos in this album.

    ';
    print $output;
    }
    }
    ?>

  3. Change the code where it says:

    $prev_th = ($previous == -1) ? '' : l(image_display($prev_node, 'thumbnail', array('width' => '120', 'height' => '120')),'node/'.$prev_node->nid, array(), null, null, FALSE, TRUE);
    $next_th = ($next == 0) ? '' : l(image_display($next_node, 'thumbnail', array('width' => '120', 'height' => '120')),'node/'.$next_node->nid, array(), null, null, FALSE, TRUE);


    to the place where you uploaded the files.

  4. You need to make the block only show on image pages. So you need to check the ‘Show if the following PHP code returns TRUE (PHP-mode, experts only).’ radio button. Caveat: The warning here means it. If you misconfure something, you may not be able to get into your site. This code works for me. Your milage may vary.

    1);
    if (arg(0) == 'node' && is_numeric(arg(1))) {
    $nid = arg(1);
    $node = node_load(array('nid' => $nid));
    $type = $node->type;
    if (isset($types[$type])) {
    $match = TRUE;
    }
    }
    return $match;
    ?>
  5. Save the block and you should be good to go.
  6. Mine is slightly styled with

    .image_browser td {
    padding: 5px 0 0 5px;
    }

If this doesn’t work for you feel free to mail me. If it works for you and there is a better way, I’d love to hear about that too. Continue reading

Posted in Uncategorized | 4 Comments

Progress

About one-hundred days to go.

Continue reading

Posted in Family

Anonymous comments re-enabled

Last night, I re-enabled anonymous comments. So, if you want to leave a comments on a blog post, you don't have to register. Anonymous commenters will have to answer a simple question to prove you aren't a spam-bot, but if you're reading this, you probably aren't a spam-bot 🙂 Continue reading

Posted in Carter