World Cup

Posted June 7th, 2010, by Aaron
No comments

The 2010 FIFA World Cup starts this Friday, June 11, with the host country of South Africa playing Mexico and ends on Sunday, July 11 with the final. Of course my most anticipated game is the June 12 game between the United States and England. When the US is not playing, I am usually rooting for England, so this will be a fun game for me to watch. Even better, my favorite player, Steven Gerrard, will be captaining England for the World Cup. The long four year wait is almost over, and below are my predictions for the latter stages of the tournament. The Dutch team was really strong in qualifying and have a top team, so I think they can get past Spain and win the tournament. I’m looking for Arjen Robben, Robin van Persie, and Wesley Sneijder to have a big tournament and give the Dutch their first World Cup win.

Quarterfinals Semifinals Final Champion

England

England

Netherlands

Netherlands

France

Netherlands

Netherlands

Brazil

Germany

Germany

Spain

Argentina

Spain

Spain

Italy

Update June 27, 2010:

We are now through the group stages and halfway through the round of 16, so now is a good time to take a look at how my predictions are coming. First of all, France and Italy were terrible picks. How did I not see that coming? The Italians are so old that it should have been obvious that they wouldn’t make it to the quarterfinals. And France is terrible without Zinedine Zidane. That fact was proven in the 2002 World Cup as well as in Euro 2008.

However, those errors notwithstanding, I’m feeling pretty good about my Netherlands pick. I still think they can get past Brazil and go all the way to the final. Argentina and Germany are also looking strong. Looking forward to how it all plays out.

Soda consumption

Posted February 4th, 2010, by Aaron
1 response

With the start of a new year, I decided I wanted to do some data tracking to get a handle on some things as well as be able to quantify them. The first thing that came to mind was tracking my soda intake. I typically drink a soda per day, so I knew it wasn’t going to be pretty. I created a basic Google Docs spreadsheet that I could access anywhere and started entering data on January 1. Doing some data entry once per day wasn’t all that bad and I think I can keep up with it for the entire year.

Now that I have some data to refer to, I can start to make adjustments and set goals. The good news is that I had already started trying to drink diet soda whenever possible, but in practice I am not doing a great job at that. That will be one of my goals throughout the year.

After the first month, here is what the data for January said:

Soda intake for January 2010
Quantity (sodas) Quantity (oz) Quanity (gallons) Calories
48 998 7.7969 5,273

Pie chart of my soda flavor consumption for January 2010

Geektool

Posted December 10th, 2009, by Aaron
No comments

So I recently upgraded my old G4 iBook to a 27” iMac. With the incredible increase in screen real estate, I found that I could (obviously) have a lot of stuff open on my desktop that would not be “in the way.” One application that I’ve been really impressed with is Geektool, a free application that lets you display different pieces of information on your desktop.

Geektool is definitely an application for advanced users. I’m not going to explain exactly how to use it. All I wanted to do was share the few scripts I’m using at the moment.

Stock Quotes

Displaying the stock quote for Apple, in the format of: Apple: 197.53 +7.66 (4.03%). I have this set to update every 1,800 seconds (30 minutes) since I don’t want to hit Google’s servers too often.


curl http://www.google.com/finance?q=AAPL | sed -n '/price-panel style/,/ Close/p' | sed -e :a -e 's/<[^>]*>//g;/</N;//ba'| sed '/^$/d' | sed -e '$!N;s/\n/ /' -e '$!N;s/\n/ /' | head -1 | sed 's/^/Apple: /g'

Calendar

I wanted a calendar that would highlight the current date in a different color. This script will highlight the current date in yellow. If you want a color other than yellow, change the 33 value to a different ANSI value. I have this set to update every 86,400 seconds (1 day). You’ll also want to use a Fixed Width font so that the dates line up properly. I use Menlo.


cal=`cal`; today=`date "+%e"`; echo "${cal/${today}/\033[1;33m${today}\033[0m}";

Weather

Probably my favorite scripts. This fetches a small image from Yahoo! and displays it along with the current conditions and a forecast for tomorrow. I update the conditions every 3,600 seconds (6 minutes). I also added the degree symbol (°) in a couple of places to spiff it up. There are multiple scripts, just change 66502 to your zip code:

Current conditions


curl "http://xml.weather.yahoo.com/forecastrss?p=66502&u=f" | grep -E '(Current Conditions:|F<BR)' | sed -e 's/Current Conditions://' -e 's/<br \/>//' -e 's/<b>//' -e 's/<\/b>//' -e 's/<BR \/>//' -e 's/<description>//' -e 's/<\/description>//' -e 's/\(.*\) F/\1°F/' | tail -n1

Forecast


curl "http://xml.weather.yahoo.com/forecastrss?p=66502&u=f" | grep -e "Forecast:" -A 2 | tail -n 2 | sed -e 's/<br \/>//' -e 's/<BR \/>//' | sed "s/\(.*\)\.\ \(.*\)/\1\?\2/" | tr "?" "\n" | sed "s/High\:\ \(.*\)\ Low\:\ \(.*\)/\?H\: \1°\  L\:\ \2°/" | sed "s/\?\(.*\)/\\1/"

Fetch the current condition image


curl --silent "http://weather.yahoo.com/united-states/kansas/manhattan-12786862/" | grep "forecast-icon" | sed "s/.*background\:url(\'\(.*\)\')\;\ _background.*/\1/" | xargs curl --silent -o /var/tmp/weather10.png\

Display the current condition image (use File instead of Shell)


file://localhost/var/tmp/weather10.png