KBD

Keith Devens .com

Friday, September 5, 2008 Flag waving
ALL YOUR BASE ARE BELONG TO US. – Zero Wing

Archive: May 03, 2004

← May 02, 2004May 05, 2004 →

Daily link icon Monday, May 3, 2004

del.icio.us links now cron'd

I finally got the impetus to cron my del.icio.us links over on the right. The format can be improved, but I'm in a hurry, so I'll do that later.

Hmm... might as well share the source. First, the cron:

<?php
$location 
'http://del.icio.us/html/keith?extended=body';
if(!
$file = @file_get_contents($location)){
    if(!
$file = @file_get_contents($location)){ #try one more time
        
die("Couldn't get $location");
    }
}
$f = @fopen('/home/keith/kbdcms/Data/delicious.html','w') or die("Couldn't open file");
fwrite($f,$file);
fclose($f);
?>

That's currently set to run every 90 minutes. Next, the part of my template which fetches the thing:

<h2 id="delicious">del.icio.us links:</h2>
<?php readfile('/.../delicious.html');?>

Piece of cake. Someone asked me the other day what's good about PHP, why I'd use it, etc. This is an example of it. If I had PHP5, I could have done away with fopen(), etc. and just used file_put_contents() and saved two lines. Smiley

Update: Updated the source a bit. Incidentally, I'm wondering if I've been confused about PHP's scoping behavior.

Kerry unfit to be Commander in Chief

LGF:

At the National Press Club in Washington, hundreds of former commanders and military colleagues of Democratic nominee John Kerry will declare in a signed letter that he is unfit to be Commander in Chief.

That article quotes John O'Neill a lot, who argued opposite Kerry on the Dick Cavett show in 1971, which was recently replayed on C-SPAN, which I watched most of. A lot of what they have to say should make both people who support Kerry on the basis of his military service as well as people who support him for other reasons take pause:

Hundreds of former commanders and military colleagues of presumptive Democratic nominee John Kerry are set to declare in a signed letter that he is "unfit to be commander-in-chief." They will do so at a press conference in Washington on Tuesday.

"We have 19 of 23 officers who served with [Kerry]. We have every commanding officer he ever had in Vietnam. They all signed a letter that says he is unfit to be commander-in-chief," O'Neill said.

We are going to be presenting a letter that deals with Kerry's unfitness to be commander and chief that has been signed by hundreds of swift boat sailors, including most of those who served with Kerry," O'Neill explained.

"The ranks of the people signing [the letter] range from admiral down to seaman, and they run across the entire spectrum of politics, specialties, and political feelings about the Vietnam War," he added.

Among those scheduled to attend the event at the National Press Club and declare Kerry unfit for the role of commander-in-chief are retired Naval Rear Admiral Roy Hoffman, who was the commander of the Navy Coastal Surveillance Force, which included the swift boats on which Kerry served.

Also scheduled to be present at the event is Kerry's former commanding officer, Lt. Commander Grant Hibbard. Hibbard recently questioned whether Kerry deserved the first of his three Purple Hearts that he received in Vietnam. Hibbard doubted both the severity of the wound and whether it resulted from enemy fire.

"I've had thorns from a rose that were worse" than Kerry's wound for which he received a Purple Heart, Hibbard told the Boston Globe in April.

Organizers are confident that Tuesday's event and the letter with hundreds of signatures will educate people about Kerry.

"It is one of the largest outpourings of concern about him being commander-in-chief that anybody could have in a presidential campaign and it is by the people who know him best," O'Neill said.

"Not only a majority of the people who served with him feel that way, but a vast and overwhelming majority," O'Neill said. He added that more than "ninety percent of the people contacted by Swift Boat Veterans for Truth responded to the request to sign their name, with only 12 declining to sign.

"In the military, loyalty between commanders and the troops serving them is a two-way street. We have here a guy (Kerry) that with all of us in the field [in Vietnam] -- actually fighting the North Vietnamese -- came home and then falsely accused all of us of war crimes at a time when the people in uniform couldn't even respond," O'Neill said.

"And he did that knowing that was a lie," he added.

"There are probably just as many Democrats amongst sailors who sailed swift boats as there are Republicans. What Kerry fails to realize is this has nothing to do with politics -- this has to with Vietnam Veterans who served, who have a beef with John Kerry's service, both during and after the war," Burkett told CNSNews.com.

Sorry to quote so much of it. I think it's important, and I'm not sure how good CNS is at keeping archives around.

Update (May 5): Here's some more on this.

The Swift Boat Veterans for Truth released the following letter to John Kerry, signed by 189 fellow veterans of the Navy vessels featured so prominently in the senator's campaign ads. The group's organizers explain that the veterans who have signed to date represent the large majority of those who served with Lt. Kerry in Vietnam. Scores of others are expected to join up in the days ahead.

Here's an essay directly from John O'Neill in the Wall Street Journal.

The simplest blog software?

I'm looking for really simple weblog software. Something that's easy to install, very easy to integrate with an existing site, and that's simple to use. Whereas I've been looking at WordPress lately, WordPress and similar software like Movable Type, while they're excellent products, are in exactly the wrong category for what I'm looking for.

I could write my own pretty easily... but, please no. So, I'm looking at Blosxom along with wikieditish. Blogger is also a possibility.

I don't need categories, though it should support sensible URLs (which probably rules out Blogger), and RSS syndication as well as support for blogging APIs would be nice to have.

Python code to post to a Movable Type weblog by e-mail

My friend is going to be living in Thailand for the next year. The original purpose for creating his blog was so that he could have a place to keep a travel-log (with pictures) while he was in Thailand. Even though he's bringing a computer with him and will probably be able to get decent Internet access, we wanted to set him up with a way to blog from his phone. How cool would it be to be able to take a picture on his phone (OR on his camera which he can move to his phone since they use the same memory stick or whatever), e-mail it to his web site from his phone and have it show up on his blog in a few minutes? So, here's some Python code I wrote for him that enables just that:

Ok, that blew out my layout, so I've saved it to: http://keithdevens.com/software/misc/mail2blog.py

I took out some debugging code still in there currently, and obviously changed some things like his password and such. Note that there's one bit which I would have done differently if I had had Python 2.3 available (the splitting of slug and title). The code could be more robust in some obvious ways, but it works well enough for us for now, and I can tweak it as the need arises. If an e-mail is lost, it'll still be in his sent mail on his phone, so it's not a big deal.

The only problem we ran into was that, while it worked great for e-mails coming from his phone or from my e-mail program (Thunderbird), Mail.app on his Mac set the content-type on the attached images to application/applefile (WTF?) instead of image/jpeg (insert swearing here), and instead of sending normal text e-mails, it sent a multipart/alternative main part that had one part plain text and one part text/enriched. Anger!

But yeah, Python rocks. The built-in easy to use POP3 library, built-in easy to use e-mail/MIME parsing library, and built-in phenomenal XML-RPC client made this code easy. Oh, and this code is public domain, feel free to use/modify/etc. for your own (non-nefarious, I hope) purposes.

Update: It appears I'm participating in a meme. Here's an article about photoblogging and moblogging. Also, I just got a very pleasant and polite e-mail from August Trometer who's about to launch a MoBlogging service at http://BlogSnaps.com. Looks neat!

Update: My friend was able to force Mail.app to generate "normal" e-mails by changing some preferences. After that, e-mails he sent worked with the code I wrote.

← May 02, 2004May 05, 2004 →
September 2008
SunMonTueWedThuFriSat
 123456
78910111213
14151617181920
21222324252627
282930 



RSS feed RSS feed for Keith's Weblog
Atom feed Atom feed for Keith's Weblog
Weblog archive
Recent comments
  on 5 posts

Recent comments XML

new⇒I hate ASP.NET

CF, why pick that piece of trash?​Cold Confusion. Is it finally​really a OO...

ColdConfusion: Sep 5, 8:36pm

new⇒Maps of Iraq

This is for Linda, I will be​visiting that site some time in the​near futur...

Bob: Sep 5, 1:20pm

Girls, please don't get breast implants

Well alright I just read my above​comment and I wanted to add​this...I shou...

76.66.140.8: Sep 4, 7:31pm

Spider solitaire

I don't think the question was​necessarily if there are unbeatable​games.  ...

Jared: Sep 4, 12:44pm

Convert Pantone Colors to RGB and Hex - Color Conversion Chart

The colors on those website don't​seem to relate to the pantone data​we hav...

blah: Sep 3, 10:12am

Generated in about 0.058s.

(Used 7 db queries)

mobile phone