Archive for December, 2006

Bash Lotto Lookup

Thursday, December 28th, 2006

My dad likes to play the NJ Lottery. He usually buys Mega Million tickets, and then forgets to check if he won anything. So every once in a while, he asks me to look up the numbers for a certain date. After doing this couple of times for him, I ended up hacking this simple bash script to automate the process:

#!/bin/bash
if [ "$1" = "" ]; then echo "usage lotto [ mm/dd/yyyy ]" ; exit; fi
lynx -dump "http://www.state.nj.us/lottery/games/1-1-3_mega_history.shtml" | grep "$1"

Note that since I’m using grep, I can do all sorts of fancy regexp stuff when calling this script. For example:, to get all the drawings from Jan-May 2006 I can simply do:

lotto 12/../.*

will find all the results from December

lotto 0[1-5]/../…6

will find all the results from the Jan-May 2006 period

Note that I can also use this for searching other fields - not just the date. For example, if I want to see all the winning number combinations that are archived on the page I can simply do:

lotto ,0

Alternatively I can do:

lotto [^0]0.00$

to see all the numbers that did not win. And of course, I can just search directly for the number sequence to see if a given number won.

I don’t know how useful is this to anyone, but I figured that I might as well put it out there, since I have been using it for a while now.

Conflicted Characters == Good TV

Tuesday, December 26th, 2006

You have to admit that Starbuck is going off the scale in the BSG personal issues department lately:

Sheldon on BSG
comic © sheldoncomics.com

But here is the thing… Conflicted characters make for good TV. This is because usually having well defined, conflicted characters with issues translates into character driven stories. I said this before and I’ll say it again:

Character Driven Stories > Plot Driven Stories

Why? Because we grow to like these characters, and become invested in their stories. Dialog and character interaction become much more than just devices to move the plot from point A to point B or to deliver back-story fluff or to explain the unraveling story to the viewers. When you have a good set of characters, each with personal goals, issues and agenda you don’t really need a “crisis of the week” type of scenarios. If you need a filler episode that is not part of the major story arc, just take two characters with conflicting agendas, have them butt heads and then just play the group dynamics to see shifting of alliances and etc… Depending on how you play it, you can have a suspenseful drama, a tear jerker, or action packed joyride.

But that’s just my opinion.

Burning .RMVB files to VCD/DVD

Monday, December 25th, 2006

The other day I got bunch of media in the RMVB format. If you haven’t heard about it, it’s for a reason. By definition, anything that comes out of Real usually sucks. This format is no different. You know that your media format is obscure as shit if you can’t play it in VLC.

The only way to watch RMVB files is to use Real Player (which can be classified as “I can’t believe it’s not Spyware” ‘ware) on Windows or Media Player Classic with Real Alternative. I haven’t figured out how to play these on Linux or Mac yet, and I’m not sure if I even want to. I never want to see this shitty format again.

Why do people use RMVB? Apparently because of the “Variable Bit Rate” encoding, it produces a files much smaller than DivX or Xvid codecs. I have never really seen these files in mainstream use on US based torrent sites, but apparently RMVB is relatively popular in parts of Europe and Asia. Apparently people in these parts of the world, haven’t figured out that Real is evil and that it smells like ass and cheese.

As you might suspect, the “be all and end all” of burning software - the Nero Burning Rom won’t even acknowledge that RMVB exists. I successfully used my Nero to create VCD’s from AVI files, but the Real format would not work.

So I searched around, and I was unable to find a free and effective way to covert RMVB to some burnable format. Apparently this proprietary format is so obscure, and quirky that few people in Open Source community want to bother messing with it. Consequently, most of available converters are proprietary and non-free.

I started scouring burning forums, and found bunch of people saying good things about using WinAvi Video Converter with the RMVB files. Unfortunately it will cost you $30 for a license.

Now, while I do not endorse illegal file sharing, or copyright infringement, I will tell you that you can easily find a serial or a torrent for a cracked version out there. I’m not saying you should do anything illegal, but - you know. It’s out there.

If you work with RMVB files all the time, it’s probably worth shelling out the cash though, because the software works. I was able to convert all my files into a DVD format, and burned them without any problems. The sound was a little poor, but then again, that might have been just the RMVB quality.

Political Correctness during Christmas

Monday, December 25th, 2006

It so happens that bunch or major religions celebrate some sort of holiday around the same time in December. But that whole or “Season’s Greetings” thing is just annoying. I’m just going to go ahead and wish all you people Merry Christmas because that happens to be the holiday that I’m celebrating at the moment. I’m not doing this out of disrespect - I’m just extending my holiday wishes to everyone, whether they celebrate Christmas or not.

Now if I happen to know that a given person is Jewish, then I might wish them happy Chanukah. But if I have no idea, do I really need to rattle off 3 (or 4 if you count Festivus) holiday names, or make it an impotent PC “Happy Holidays”? When I say Merry Christmas all I mean is:

“Hey, I happen to be celebrating Christmas at the moment! If you do too, then have a Merry one!”

In the same spirit, if someone would wish me happy Chanukah or Kwanzaa I would not mind. I would gladly accept the wishes, and reciprocate with the same.

So this is a new rule for December. Next time a random person that you don’t know wishes you happy/merry whatever, and it happens to be a different holiday from the one you celebrate, just say thank you, then repeat whatever they said, and move on. Don’t get offend them, don’t correct them, don’t make a scene. Just take the wishes, and go.

Merry Christmas you people!

December Summary

Sunday, December 24th, 2006

Fairly accurate of what is on people’s minds this December:

December Summary

image © elephantitis of the mind

Yes, I saw that video on Youtube. And on about 27 blogs that I subscribe to. And in most LJ communities. And on people’s myspace pages. And in about 14 emails. It was amusing the first time around, but now let’s just drop it, unless you are actually planning to do it this year. And if you do, more power to you!