This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add the following to .bash_profile, replace 47401 with appropriate zip code :) | |
alias weather="curl --silent 'http://xml.weather.yahoo.com/forecastrss?p=47401&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///' -e 's/<\/description>//'" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.directive('spinner', ['$window', function ($window) { | |
return { | |
scope: true, | |
link: function (scope, element, attr) { | |
scope.spinner = null; | |
function stopSpinner() { | |
if (scope.spinner) { | |
scope.spinner.stop(); | |
scope.spinner = null; |