Nerding out
So I just wrote a little Perl program and I thought I’d share it for any computer programmer people that may be reading this blog, as I think it’s pretty nifty.
I use Gmail for email, and I forward certain emails to my web server, which reformats the message and forwards it onto my cell phone as a text message. For example, if I receive a private message on a web forum, I’ll get a text message letting me know. This works great as if I am not at my computer, I can respond quicker since I know that I have this private message waiting, rather than finding out later that night when I get home. However, if I’m already online and have gmail open, I’ll see the private message AND I’ll get a text message about it. Kind of annoying.
Today I programmed the solution. In the script that reformats the message and sends it on to my cell, it first does a check to see if I’m already logged into Gmail, and if I am, it won’t send me a text. It was actually pretty easy… the script just logs into my Gmail and then looks for a string of text at the bottom of your inbox that tells you if you are logged in from other locations. If I am, then I’m reading my email. If I’m not, then my Gmail is not open and it will send the text.
The only problem I’ve found with this is that if I have just closed my email when a message comes through, it still thinks I’m logged in, so it won’t send a text. I’m willing to live with this, though, as most of the time I am saved the double message.
Told you I was nerding out.
wheeny said,
October 9, 2009 at 12:41 am
I’m usually good with computers, but I have no idea what you just said, so I’d say the post title is fitting!
What I, and the rest of the audience (I’m sure), want to know is: “I’ll have a blog post about a Bellagio win shortly.” – when’s this comming?
veerob said,
October 9, 2009 at 12:47 am
Today was my first day back playing live poker in about 3 weeks. I bricked out of the tournament at Bellagio but won my S&G. Does that count?
wheeny said,
October 12, 2009 at 1:17 am
Not as a blog post, but sure, it counts.