After spending bloody ages trying to figure out what to do with my dmg files, I've finally found a great little Javascript dmg2iso tool. It seems to have worked brilliantly (run from within ubuntu linux 9.04 with Sun Java 6 Runtime). Ofcourse it'd all have been easier if I'd known there was a windows dmg2iso easily available - but then I'd also have to have a windows box :-p
Kam
Saturday, September 19, 2009
Sunday, September 13, 2009
PHP Email Script
Below is a php html/plain (mixed type) email script that I've shamelessly taken from webcheatsheet.com. It's a good sample to start building your own emails from.
Kam
Kam
//define the receiver of the email
$to = 'youraddress@example.com';
//define the subject of the email
$subject = 'Test HTML email';
//create a boundary string. It must be unique
//so we use the MD5 algorithm to generate a random hash
$random_hash = md5(date('r', time()));
//define the headers we want passed. Note that they are separated with \r\n
$headers = "From: webmaster@example.com\r\nReply-To: webmaster@example.com";
//add boundary string and mime type specification
$headers .= "\r\nContent-Type: multipart/alternative; boundary=\"PHP-alt-".$random_hash."\"";
//define the body of the message.
ob_start(); //Turn on output buffering
?>
--PHP-alt-
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Hello World!!!
This is simple text email message.
--PHP-alt-
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: 7bitHello World!
This is something with HTML formatting.
--PHP-alt---
//copy current buffer contents into $message variable and delete current output buffer
$message = ob_get_clean();
//send the email
$mail_sent = @mail( $to, $subject, $message, $headers );
//if the message is sent successfully print "Mail sent". Otherwise print "Mail failed"
echo $mail_sent ? "Mail sent" : "Mail failed";
Friday, September 11, 2009
Amarok on Ubuntu 9.04
I *finally* got amarok working on ubutnu 9.04, it wasn't easier than downgrading to a previous version, but I'm glad it works. I actually used three solutions, so I'm not sure which actually fixed the problem, or if they all contributed a little. I'd try one at a time, they have no side effects:
(Solution 1)
0. kill amarok
1. sudo apt-get install libxine1-all-plugins
2. run amarok & test
(Solution 2)
0. kill amarok
1. sudo apt-get install phonon-backend-xine.
2. sudo apt-get remove phonon-backend-gstreamer.
3. run amarok & test
(Solution 3)
0. kill amarok
1. open a terminal window
2. mkdir ~/.config/kde.org/
3. cd ~/.config/kde.org/
4. wget http://www.fileupyours.com/view/77985/libphonon.conf
5. run amarok & test
Hopefully it'll start working after 1 :)
Kam
(Solution 1)
0. kill amarok
1. sudo apt-get install libxine1-all-plugins
2. run amarok & test
(Solution 2)
0. kill amarok
1. sudo apt-get install phonon-backend-xine.
2. sudo apt-get remove phonon-backend-gstreamer.
3. run amarok & test
(Solution 3)
0. kill amarok
1. open a terminal window
2. mkdir ~/.config/kde.org/
3. cd ~/.config/kde.org/
4. wget http://www.fileupyours.com/view/77985/libphonon.conf
5. run amarok & test
Hopefully it'll start working after 1 :)
Kam
Subscribe to:
Posts (Atom)