Know your weather from terminal
Here is a small trick i tired to find the weather from the terminal.
The simple code below , gives you the update of current weather in Bangalore.
You may change it to your place by changing the feed as per requirement.
Follow these steps :
$ sudo vi ~/.bashrc Add this at the last : alias tmp="curl -s --connect-timeout 30 "http://newsrss.bbc.co.uk/weather/forecast/1193/ObservationsRSS.xml" | grep "Temperature" | sed -e 's/°/ deg /g' | sed -e 's/%/%/g'| sed 's/<[^>]*>//g'" Save and close the file . Now , source ~/.bashrc Then, $ tmp Temperature: 22 deg C (72 deg F), Wind Direction: W, Wind Speed: 11mph, Relative Humidity: 86%, Pressure: N/A, no change, Visibility: Good
Indeed it's a pleasant weather here in Bangalore (India) today :)
Recent blog posts
- watir-webdriver web inspector
- gem list to gemfile
- Packing ruby2.0 on debian.
- Made it into The Guinness Book!
- to_h in ruby 2.0
- Filter elements by pattern jQuery.
- Better HTML password fields for mobile ?
- Grayscale image when user offline
- nth-child CSS pseudo-class Christmas colors
- EventEmitter in nodejs