Tuesday, June 16, 2009

iTunes under XP 64? Tough one

This isn't the first time I've encountered lack of device support for XP64. The recent one was my Huawei hsdpa stick. Works in xp32bit and Window 7 64bit rc hmmmm.

I had some problems with iTunes too, it kept insisting that it needed s 64bit Vista. Downloaded Orca from Microsoft and removed the restrictions from the iTunes64 msi. It... works now.
-posted via mobile while travelling on a crowded bus

How i wasted a tuesday evening

My old Dell XPS notebook runs at home while I go to work and I occasionally RDP back to it. I usually see some IMs on my Pidgin IM when I log in, thought it would be a good idea to script something in Python+ D-BUS to send mail to my gmail account once I get any new messages, so I can check them on my work desktop, or Wince mobile. Till I realized the Win32 Pidgin doesn't have D-BUS.

The next best alternative calls for a quick and dirty scripting using Perl(ActivePerl 5.10). Boy the documentation is pretty sparse. After googling around(http://sriunplugged.blogspot.com/2009/03/autoreminder-in-pidgin.html) I've managed to come up with a script that works. Phew. Todo: presense + stripping html tags from the messages.

Bedtime now.



use Purple;
use Pidgin;
use Net::SMTP;

%PLUGIN_INFO = (
perl_api_version => 2,
name => "Email New Message Plugin",
version => "0.3",
summary => "script to mail to user any message received",
description => "Sends an email when a new message is recieved",
author => "Alvin Ng (Rebooting at gmail) ",
url => "http://pidgin.im",
load => "plugin_load",
unload => "plugin_unload"
);
sub plugin_init {
return %PLUGIN_INFO;
}
sub plugin_load {
my $plugin = shift;
Purple::Debug::info("testplugin", "plugin_load() - Test Plugin Loaded.\n");
Purple::Signal::connect(Purple::Conversations::get_handle(),'received-im-msg',$plugin,\&im_received,

'received-im-msg');

}


sub im_received {
Purple::Debug::info('incoming', "im_received\n");
# SMTP details here
my $smtp_server="smtp server";
my $sender='sender@domain';
my $recp = 'recipient@domain';

my ($account, $imsender, $message, $conv, $flags) = @_;

#log it

#send it, TODO: mail it when the client is set to any other status but online

$smtp = Net::SMTP->new($smtp_server);
$smtp->mail($sender);
$smtp->to($recp);

$smtp->data();
$smtp->datasend("To: $recp \n");
$smtp->datasend("From: $imsender\n");
$smtp->datasend("Subject: New Message from $account::$imsender \n\n");
$smtp->datasend("$account : $imsender \n");
$smtp->datasend($message);
$smtp->dataend();
$smtp->quit;

}
sub plugin_unload {
my $plugin = shift;
Purple::Debug::info("testplugin", "plugin_unload() - Test Plugin Unloaded.\n");
}

Monday, June 15, 2009

Iron Python

Putting this posting to remind me to find out about iron python. can I use it for WMI?

Thursday, June 4, 2009

Umm.. I just remembered Kubuntu

Having some trouble compiling the VirtualBox Guest addons for Fedora. I'll just snag a copy of Kubuntu off bit torrent and see if this one's any better. What a pity, FC 10 really looked good.

Hello Fedora 10


It's certainly nice to try Fedora again, the version I last used was FC 3 and that was it. I'm getting tired of using Gnome on Ubuntu and wondered how the KDE version of Fedora looks like. Just got around installing it. I'm going to use it to develop stuff and see how it goes.