Get Weather from Command Line
There's an awesome script making the rounds on Twitter and I've been as excited as everyone else so I thought I'd show it. Many of us live eight hours a day within the command line (although I'm not a vim hippie like some of you) so I try to find new ways to accomplish tasks from within iTerm (like getting bitcoin value or stock quotes). Many of these solutions include using cURL and this awesomeness is no exception!
You can get weather information from command line using cURL and wttr.in
:
# Allow geolocation
curl -4 wttr.in
# Request a city
curl -4 wttr.in/Madison
wttr.in
does well to guess location if one isn't provided so in most cases you wont need to provide your city.
There you go, another awesome way to get the information you need from command line!
One of the web components I've always loved has been Facebook's modal dialog. This "lightbox" isn't like others: no dark overlay, no obnoxious animating to size, and it doesn't try to do "too much." With Facebook's dialog in mind, I've created LightFace: a Facebook lightbox...
With Firefox OS, asm.js, and the push for browser performance improvements, canvas and WebGL technologies are opening a world of possibilities. I featured 9 Mind-Blowing Canvas Demos and then took it up a level with 9 Mind-Blowing WebGL Demos, but I want to outdo...
I love to look around the MooTools Forge. As someone that creates lots of plugins, I get a lot of joy out of seeing what other developers are creating and possibly even how I could improve them. One great plugin I've found is...
One of the website features my customers love to provider their web users is an online dynamic calendar. An online calendar can be used for events, upcoming product specials, memos, and anything else you can think of. I've taken some time to completely...
Frickin’ genius!
This is excellent! As a relative rube when it comes to the command line though, can someone kindly explain the purpose of
-4
in the command? I seem to get the same results whether I include it or leave it out.its used for Resolved name to IPv4 Address
It looks like iTerm here translates/renders the curl response HTML output? Or curl implicitly does that (if so what version of curl are you using)? Because the raw HTML (unprocessed) does not look as nicely displayed as the screenshot. Only if you render the HTML will it look like that.
I created an (OS X only) to automatically show your local weather:
https://gist.github.com/6343547a0169e9b6167d