Solving problems that never really existed
I use a combination of weechat and bitlbee to have access to my oscar and xmpp chat accounts right next to irc. For a while it was set up to text me from Google Voice whenever I received a message from marked as away. The problem is that Voice does not have a public API. The tool I was using was basically using curl to log in and pull data from the web page. It was very hacky, and when Google changed their authentication recently, it was completely broken.
Jason gave me the idea of using email instead. This was much easier to set up and since it uses a long standing standard, it shouldn't break.
This was good, but to respond to the messages I received, I'd still have to SSH into my computer, which is kind of painful on my phone over 3G and without a real keyboard.
To solve this non-issue (I really don't need to respond to people instantly), I wrote a python script for weechat that logs in to my secondary (or is it my tertiary) gmail account, where the replies are sent, and checks for new messages via imap. The only external library needed is imaplib, to facilitate imap communication. The format is easily abusable: If it is sent from my main gmail, then it assumes it is a reply. The subject contains the recipient of my message, since my notifications put the person in the subject, and the body is the message itself. It's pretty simple to parse the imap message for this information, and even simpler to use the weechat library to send the message to the appropriate person. I don't count the weechat library as external since it is implied when I say this is a weechat script.
The script checks every five minutes and so far works wonderfully.
I guess now that when I'm marked away, I'm not really away, per se.
I need to clean up the code a bit, make it more generic, and take advantage of setting options within weechat (I currently hard code my login information), but I plan to post the code here. I'll probably detail the entire set up I have since it is a combination of two plugins. Because of this requirement of the other script (away_action), I'm not sure if it would be appropriate to submit to the weechat script repository.
Anyway, I was able to whip this out in very little time, and I think I'm finally beginning to understand the appeal of python.
Posted from WordPress for Android
A Small Download
Here's an ultra alpha version of my todo app mentioned in the previous post. It's incredibly usable, I think, but I know there are a few issues. Nothing the user should encounter (unclosed cursors, for example), but definitely high on my todo list.
I've not had much time to work on this recently since I'm in between apartments at the moment.
But yeah, try it out, leave a comment.
Download
Posted from WordPress for Android
Break Things, Please!
I posted this in my status on Facebook, but crossposting yields wider audiences. Amber conscripted me to build a simple submission and voting script for an upcoming Doctor Who fanvideo contest. I think I'm mostly done with it, which means that there's a ton of bugs to be fixed, naturally. I've already gotten the obvious SQL injection one (look at one of the submissions on the vote page, it has a drop table statement in it that should've cleared all the submissions) and Richard already helped me fix one that came up if the page was open in two different tabs or browsers (just a simple check fixed it; a stupid one, but simple), but I want people to keep trying to break it. Amber doesn't need it until the end of April or so, so I've got plenty of time to beef it up if anything is found.
So, go for it. Try all your stupid little user tricks, things I would never have thought of as the programmer (such as the multiple tab thing Richard showed me).
This project was really fun. I got to learn some more php, expand upon my sql, learn how to use sql within php, and probably most fun of all: learn how to use ajax. Since voters are to vote on multiple categories, I did not want to have to reload the page every time they voted in one category, that would be a waste of the voter's time. Especially when the page gets to be pretty long with a ton of submissions (I'm assuming it will get long (there's twenty-nine categories after all), and that there will be a ton of submissions). So, instead, when they vote on a category, it'll just collapse the form in that category into a "Thank you for voting!" message and the voter can go on unabated. I like it, it's really cool :razz:
The thing logs based on IP address, so of course if you go to another computer and try to vote again, you'll succeed. And of course if you use a proxy, etc. etc.
--A dude just walked past my window and freaked me the hell out. Looks like he was checking something on the outside of the buildings.--
Amber said that the people who will be participating are unlikely to go about vote stuffing in this manner since... well, they're generally fourteen year old fangirls who know shit about computers (though they can kick my ass at video editing, that's for sure).
But yeah, try anything, everything. And if you break it or find something that you think might be broken, just leave a comment on this post.
Also, yes. It is intentionally ugly (this is Corey's big issue for some reason, and yet his IPRO site looks like it was made in frontpage). I plan to just php include() them into Amber's site later on and CSS the hell out of them.
I watched A Dog's Breakfast before going to bed last night. It was surprisingly good. It stars David Hewlett (Rodney McKay, Stargate: Atlantis), his sister Kate Hewlett (Jeannie Miller, Mckay's sister, Stargate: Atlantis), and Paul McGillion (Dr. Carson Beckett, Stargate: Atlantis; Young Dr. Ernest Littlefield, Stargate: SG-1 "The Torment of Tantalus"). The Hewletts again play siblings, with McGillion as Kate's actor fiancé. It started out a little.. slowish for me, but then just took a turn for the awesome. Especially the cameo by Christopher Judge (Teal'c, Stargate: SG-1). Holy hell. He plays such a serious character on SG-1, and while I knew he was a funny guy, I didn't realize just how awesome he could be. He really needs more comedy jobs. It's a small cast, and it's basically all Stargate regulars, but it's so refreshing to see them all outside of the Sci-Fi genre doing some good ol' comedy.
I recommend the movie, even if you aren't a fan of Stargate. David Hewlett's performance is top-notch and his chemistry with Kate is perfect (which probably has something to do with the fact that, you know, they're siblings and all). McGillion is great too (one of my all time favorite actors on Atlantis).
The Prometheus ship set/stage also makes an appearance, as McGillion's character is an actor on a really bad Sci-Fi show (where Rachel Lutrell, also of Atlantis fame, makes a cameo) that seemingly takes place aboard an advanced space ship.
This is why I love Linux/Opensource
Jeremy was playing around on ShinyCat trying to get Compiz installed for some nifty orange glows around his windows. Well, ShinyCat has crappy integrated ATI drivers and we couldn't get any of the drivers properly installed so Compiz kept giving stupid errors. He was kind of bothered that we couldn't get this to work, so jokingly I said "The xfce compositor does shadows, just change the color in the source code."
That joke turned into the project for the next ten minutes which included hunting down the XFCE Window Manager source code and finding where in said code the color for the shadow was defined. Jeremy now has orange "glows" around his windows and pop up menus without the bloat and resource eating that Compiz would bring to ShinyCat.
It was fun.
On the todo list for the window manager is "selectable shadow colors." I'm pretty sure I could patch it so that it accepts arguments from the command line for colors, but I wouldn't quite know how to bring it into the GUI (though maybe I should attempt that over break? If it's still on the todo list (which is only a couple of months old?), that possibly means that someone hasn't submitted a patch to implement such a thing yet?).
The changelog for the latest 4.6 beta (current stable release is 4.4.3) says that they've implemented changing the opacity value but not color yet. =P

Before (on white):

After (on black):

