Who Needs Free Time

Simple, yet addictive games are my productivity kryptonite. I play Mahjongg, Minesweeper, and a host of other flash-based games on the web. The latest installment came to me via Reddit. Play Orbit and have fun doing it. I got up to twelve planets before finally pulling myself away.

Eat it Cingular

I don't know why, but Cingular apparently does not want me paying my bill. When I log into my account to pay online, I was taken to an intermediate page where I was asked, in a mandatory fashion, for my email address. I'm not a big fan of giving that sucker out for no reason, so I simply clicked the 'Continue' button. Unfortunately, the button was a link whose href was the lovely octothorpe. This of course meant I was going nowhere by means of that button. I was quite peeved at this point because, not only did I not get an explanation from the page telling my why my email was required, but I also had no explanation for why the continue button failed to do so. The age-old adage, "Fail to communicate with me properly once, you suck; fail twice, now I'm pissed" came to mind. So what's a web geek to do? Obviously search the page's javascript for the form submission line and execute it directly through Firebug commandline! Should any Cingular users get frustrated as well, get Firebug (and Firefox, which I have to mention since Google Analytics tells me the internets are alive with IE users still - shame on you all), and execute this line of code:

document.updateRequiredRegisteredInfoActionForm.submit();

Not only did this forward me on to my account page, but it also bypassed the need to fill in my email for no good reason. I get enough spam as it is. So there it is my friends; simple, one-liner to defeat Cingular's attempts to be poor communicators. A silver lining here, besides getting in, is the lesson learned from Cingular's mistake: Don't suck at communicating with your users! So long, and thanks for all the fish.

A Day Of Sports

Christina suprised me Sunday with Rams tickets! The game was crazy and lots of fun, though the Rams were not able to hold onto the victory. On our way back from the game, we were phoned by Josh Sprague who informed us of the availability of 4 Cardinals tickets for Sunday's NLCS game 4. These seats were 8 rows back behind homeplate, with an all-you-can-eat buffet pre-game and all-you-can-eat ballpark food during the game - all for free. Throw in free parking across the street from the stadium and its hard to refuse. I certainly had quite the night eating; its estimated at over $50 worth of ballpark food went into my belly, plus the buffet beforehand. Cards lost, but there's no better way to watch them lose… What a fun day! 271653482_17f553b804_m.jpg271653481_eecebfa02b_m.jpg271653477_d256556365_m.jpg271653471_9fffcfbc13_m.jpg

mp3 to wav conversion

Looking to convert those "legally" purchased mp3 files to wav so you can play them in your boombox? Here's a handy dandy little shell script to facilitate the conversion process:

for i in *.mp3; do lame –decode $i `basename $i .mp3`.wav; done

The obvious usage: Navigate to the directory where your mp3 files are located. Run this script in the directory, and viola, all the mp3 files will be converted to wavs  with matching filenames and the .wav extension. Perfect for burning to CD! Do note that this requires lame and basename to execute properly. Enjoy those "legal" mp3s!

Holidays are here

Ah, its nice to be on holiday. What holiday is on September 13th you ask? Programmer's Day, of course!!! Internationally recognized as 'the' holiday of choice, Programmer's Day is all about celebrating the fun of being a geek. So come on everybody, live it up!

That's so rufus

In the quest to continually update our language and give it new forms of expression, and because I = geek, I am going to help promote an alternative to the geeky "you got owned" and its various l33t spellings, one that should hopefully appeal to a broader audience. Now, instead of getting "owned", its "you just got Mario-ed!". This is short hand notation for saying "You got one-upped", and as we all remember, 1-ups were fairly elusive in the original Mario Bros. So there you go, inspired by xkcd, I challenge you to let people know when you've Mario-ed them.

Linux-Fu For File Deletion

Having setup a backup server for work and home, I was looking into how to remove archives that were a week or older. Initially, I wrote a simple script to search a path for files that matched a naming convention and whose creation dates exceeded the week limit. This was fine and dandy but not the most elegant and didn't really increase my linux-fu. So I decided to delve deeper and find a good one-liner that embraces the linux way of life. My result:

rm `find path/to/backups -mtime +7 -name '*.bz2'`

The breakdown:

  1. rm - remove files, any n00b knows that…
  2. the ` mark surrounding the argument passed to rm denotes that the shell should use the result of executing the command(s) inside the ticks as the arguments to rm. This tick can be found to the left of the number one.
  3. find does that, finds files and lists them to stdout, generally the screen.
  4. /path/to/backups is the path find begins its search from…
  5. -mtime +7 says find files who's modification time is more than 7*24 hours ago, effectively a week or more in the past.
  6. -name '*.bz2' matches any file ending in with the .bz2 extension.

Slap that sucker into a cron job and you have yourself an automated way to maintain a certain number of files that do not exceed a certain time frame. find is enormously useful and has so many wonderful options to assist you in your file searching. So there you have it, a simple one-liner to remove files based on their timestamp.