It’s a nifty little piece of code found at www.codejedi.com that is nice for the compulsive list maker. It’s cheap too, at $16-23 depending on what you want to do with it.
People always seem semi-surprised that I autopost in some journals and communities. I do it because I’m forgetful and compulsive. Anyhow, should you feel the same need, here’s how I’m doing it.
Also, note, portions of this code were wrote by Emmie P. Lewis. Don’t who she/he is, but thanks for sharing, so now I’m doing the same.
[root@localhost root]# cat /dancron/ljPost.pl
# How to send email with Net::SMTP
# Copyright 2000, Emmie P. Lewis
# Created 02/20/00
# This script is designed to show
# how to use Net::SMTP to send
# email from a Perl script.
# Modified by Daniel J. Doughty <firstname.lastname@example.org>
# Now it sends a post to livejournal.com via Emmie’s code.
# Modified early 2005
# WARNING. This is a hardcoded value. You can tell I meant to catch it via a flag, but haven’t implemented it. Feel free to fix or hardcode your own community here.
$opt_c = “some_community_name”;
#print “Content-type: text/plain”, “\n\n”;
# This debug flag will print debugging code to your browser,
# depending on its value
# Set this to 1 to send debug code to your browser.
# Set it to 0 to turn it off.
my $DEBUG = 0;
$| = 1;
# Another hard-coded value.
# Set this variable to your smtp server name
my $ServerName = “smtp-server.kc.rr.com”;
# Create a new SMTP object
# This is the debug option
#$smtp = Net::SMTP->new($ServerName, Debug => 1);
$smtp = Net::SMTP->new($ServerName, Debug => 0);
# If you can’t connect, don’t proceed with the rest of the script
die “Couldn’t connect to server” unless $smtp;
# Initiate the mail transaction
# Your “real” email address
# Another hard-coded value
my $MailFrom = “yourname\@yoursmtphost.com”;
# Recipient’s “real” email address, yup, you guessed it. Hard-coded. AND PAY REAL CLOSE ATTENTION HERE. REPLACE THE 1234 WITH YOUR OWN PIN THAT YOU SET UP AT LIVEJOURNAL.COM
my $MailTo = “someljname.$opt_c+1234\@post.livejournal.com”;
$smtp->mail( $MailFrom );
$smtp->to( $MailTo );
# Start the mail
# Send the header
# This address will appear in the message
# Same as the note above. I don’t know why this is repeated. She did it, not me.
# So will this one
# Send the body.
# Send the termination string
# Close the connection
Here’s the crontab entry I use to call it. It accepts 3 flags, -s for subject, -b for the body and -i for the image to post with. This image tag must already be uploaded and named correctly. If you post the wrong image name, it will just use your default image, if you have one.
29 17 */7 4-9 * /dancron/ljPost.pl -s “SUBJECT” -b “Body of text” -i “can’t remember what this flag is for”
my stupid file server is messing up again. what in the hell? I ran a sanity check on the RAID this morning and it failed, so now it’s rebuilding. I’m beginning to believe this rocketraid 1640 is a not much good.
anyhow, off for juevos rancheros from my favorite waitress.
bad idea. but here’s how I came to decide to buy it.
I shopped on wal-mart.com. I was hoping that they had fixed the most annoying thing about wal-mart.com. That you can’t find out what something would cost in the store, or if it’s in stock.
So anyhow, I found they had a 4MP Elph on the web for $250. That’s not a bad deal. Plus it included free shipping to the local store. So I go to the store. They don’t have it. They have the 3MP Elph for $280. I asked for a price check, hoping that it would be less than $250. Nope, it’s $280. Stupid wal-mart. So I buy the cheapest camera they’ve got, figuring I’ll just return the POS if it doesn’t work out.
Yeah, so I’ll be returning it in short order. Because it was awful.
second time in two weeks. sure it was only a few minutes. but it destroyed my RAID last time. You know, the big 400GB mirror? Yup, it’s toast.
Guess I’ll have to look at an UPS. this is getting silly.
<img src=”http://www.nerdtests.com/images/ft/cg.php?val=2804″ alt=”My computer geek score is greater than 89% of all people in the world! How do you compare? Click here to find out!”> </a>
Apple has come to it’s senses: http://www.lifehacker.com/software/m