Entries tagged with “General”.


This morning, following the standard dog walking to get the Sunday papers I found a dead blackbird (female) at the front door of the house – her poor neck had been broken from an impact with the window. We’ve had this problem before, but it’s generally from the low windows; the impact isn’t fatal and usually the bird shrugs it off in a few minutes and gets going. Today, however it was, unfortunately dead.
I picked it up to leave it in the back garden and it still felt warm. As I walked back to the end of the garden that warmth kept flowing into me.
It was truly disturbing to think that if I hadn’t been there all that heat would have just passed away without ever having had an impact on anything.

Testing the fluid/iphone ui for moveable type. It seems quite usable

Short and simple: http://en.gravatar.com/avatar/<md5 hash of email address>?.
e.g. echo -e ‘bob@email.com’ | md5sum gives: c961431faea38ed65bfd982cf2e31bd0.
Optional add-ons are size (s=<Number of pixels>), content rating (r=<g, pg, r, or x>), and default (d=<escape encoded URI of an image or one of identicon, monsterid or wavatar>).
great place to do something akin to the ‘imitate a lotus notes password entry trick’.

One of my co-workers had to say goodbye to his father today. He suffered from Alzheimers, which is probably one of the worst things that anyone can get. To progressively lose all those things that hold us together as an individual is probably one of the worst things that can happen.
My father passed away less than a year ago, but he was as vital, as intelligent and as cogent as he ever was. We never expected him to pass so suddenly. If I had to see him disintegrate in the way that Stephen had, then I don’t think I could have taken it.
Make the most of your family while you have them. Even if they’re mad, causing problems, or simply cranky, they’re your family.

It beats walking, but when you’re get to the airport only to discover that your flight is delayed by an hour kind of annoys you. I spent a short amount of time futzing around with tunnelblick and it finally works. Of course I have no intentions of doing any work today … It’s my day off.

My sister Anne-Marie just gave birth to a baby boy with a weight of 5lb 6oz (~2.5kg for the metric minded). Mother and baby are doing well. Hope that’s the last of them for the near future.

Everyone talks about the calm before the storm. It’s true that things seem hella quiet just before all hell breaks lose, but the reality is that once the storm is gone everything is quiet again. This is of course, excepting all the extensive property and personal damage that will have happened around you. After all, I mean the actual world.
I have had my own little storm, and have come out of it feeling quite calm. The storm was worth it to find out just quite what the calm was like in the first place.
It’s all a bunch of abstract statements, but the end product is a happier Mr. Pete. And I can get more cake now. Yummy cake! I am obsessed!

I am wandering to Cork for the afternoon and some of the evening. It’s the standard Warpcon weekend, but I find myself unable to go for all of it. I will be driving down this afternoon and driving back this evening. I think it will keep me sane… I don’t think I could deal with my usual level of excess on that weekend.

Send Vodafone ireland text messages from the command line. Uses the keychain info from safari on the mac. There’s an annoying sleep as it looks to detect pump-and-dump html requests (i.e. scripts like this).


#!/usr/bin/perl -w

use strict;
use HTML::Form;
use HTTP::Request;
use LWP;
use Data::Dumper;
my $username;
my $password;
my $message;
my @recipients = ();
if ($^O eq “darwin”) {
# Log in once to webtext under safari and this will work
# you need to allow the security program to access the keychain
open(IN, “security find-internet-password -g -s www.vodafone.ie -r htps 2>&1 |”) || die “$!”;
while(<IN>) {
if (m/”acct”<blob>=”(.*)”/) { $username = $1; }
if (m/password: “(.*)”/) { $password = $1; }
}
close(IN);
} else {
# use something else, or program the passwords here
$username=”0876666666″;
$password=”password”;
}
my $webtext_url=”https://www.vodafone.ie/myv/messaging/webtext/index.jsp”;
sub usage {
print “$0 <addressee1> […<addressee5>] \”Message\”\n”;
exit 0
}
usage() if ((scalar(@ARGV) < 2) || (scalar(@ARGV) > 6));
while (scalar(@ARGV) > 1) {
push(@recipients, shift @ARGV);
}
$message = pop(@ARGV);
if (length($message) > 160) {
die “Message too long.\n Shorten to: \”” . substr($message, 0, 160) . “\””;
}
my $ua = LWP::UserAgent->new;
push @{ $ua->requests_redirectable }, ‘POST’;
$ua->cookie_jar({ });
$ua->agent(‘Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en) AppleWebKit/523.10.3 (KHTML, like Gecko) Version/3.0.4 Safari/523.10’);
my $response = $ua->get($webtext_url);
#print Dumper($response);
my @forms = HTML::Form->parse($response->content, $response->base);
my $form = undef;
foreach (@forms) {
if (defined($_->{‘attr’}) &&
lc($_->{‘attr’}{‘name’}) eq “login”) {
$form=$_;
}
}
die “Could not get Login Form” unless $form;
$form->value(‘username’, $username);
$form->value(‘password’, $password);
$response = $ua->request($form->click);
die “Login Failed” if (!$response->is_success || $response->base =~ /Login.shtml/);
$response->as_string() =~ /emaining messages this month:.*>(\d+)</s
or die “Unexpected response: ” . $response->as_string() . ” Couldn’t determine number of remaining texts”;
my $remaining = $1;
@forms = HTML::Form->parse($response->content, $response->base);
$form = undef;
foreach (@forms) {
if (defined($_->{‘attr’}) &&
lc($_->{‘attr’}{‘name’}) eq “webtext”) {
$form=$_;
}
}
die “Could not get Webtext Form” unless $form;
# walk the label for=… -> form id=… matches
my %chk_labels;
my %address_book;
%chk_labels = $response->content =~ m/label for=”chk_box_(\d*)”>([^<]*)</g;
#print Dumper($form);
foreach (keys(%chk_labels)) {
my $iv = $form->find_input(“chk_box_$_”);
$address_book{$chk_labels{$_}} = $iv->{menu}[1]{‘value’};
}
$form->value(‘message’, $message);
my $i = 0;
print “Sending: $message to “;
foreach (@recipients) {
my $phone = $_;
if (!($phone =~ /^[0-9]/)) {
$phone = $address_book{$phone};
}
$form->value(“recipients[$i]”, $phone);
print $phone . ” “;
$i++;
}
print “\n”;
sleep(5);
$response = $ua->request($form->click);
die “Message was not sent correctly” . Dumper($response) if (!($response->as_string() =~ /Your message was sent to:/));
$response = $ua->get($webtext_url);
$response->as_string() =~ /emaining messages this month:.*>(\d+)</s
or die “Unexpected response: ” . $response->as_string() . ” Couldn’t determine number of remaining texts”;
if ($remaining == $1) {
die “Even though the message was sent, the number of available messages didn’t reduce”;
}
print “Remaining Messages: $1\n”;
exit 0

Download Here

I just uncovered the photographic evidence of my debs (prom) – a sleeve of photographs from the night. I cringe and then remember that some of the people in the pictures are no longer here.