Archive for March, 2010

Displaying stocks on your mac desktop

If you are into trading and have mac and want to be really update with your stock market, here is a little tip:

Install Geektool 3 download my little Yahoo Script and you can display any symbol right on your desktop. Set your own custom refresh rate.

It display red when negative, green when positive and white when stale.

Feel free to use it, and modify it the Yahoo Codes are here


#!/bin/bash
STOCK=$1
VALUE=`curl -s "http://download.finance.yahoo.com/d/quotes.csv?s=$STOCK&f=l1"`
GAIN=`curl -s "http://download.finance.yahoo.com/d/quotes.csv?s=$STOCK&f=c1"`
GAINP=`curl -s "http://download.finance.yahoo.com/d/quotes.csv?s=$STOCK&f=p2"|sed -e 's/"//g'`

ESC=`printf "\e"`
WAY=`echo $GAIN|grep "^-" -c`

ZERO=`echo $GAIN|grep "^0.000" -c`

if [ "$ZERO" == "1" ]; then
echo "$ESC[37m $STOCK $VALUE $GAINP $ESC[0m"
elif [ "$WAY" == "1" ]; then
echo "$ESC[31m $STOCK $VALUE $GAINP $ESC[0m"
else
echo "$ESC[32m $STOCK $VALUE $GAINP $ESC[0m"
fi

, ,

1 Comment

Singapure

We left Honk Kong this morning, it was amazing. Last night all DW crew went on pirate ship! And spent over 3 hours in the main harbor, totaly cool, all you can drink . It turned into dancing party while i was mixing music from my iphone! We force the ship crew to stay another 2 hours , it was just amazing.

We got back to hotel had our usual 1am Duck + Beer at local street pub. Waking up was bit painful but we got on airport and arrive in Singapore , found our self Hostel (YMCA) did a bit of work and back to the town. But we took it very lazy style , no walking no partying, we actually went to movies hehe, saw Love from Paris, which was quite entertaining had lovely Japan Diner and got all presents from crazy Japan shop where everything cost $2!

Tomorrow seeing more city and then flying back to Perth!

Traveling is amazing!

, ,

No Comments