Skip to content

Instantly share code, notes, and snippets.

View fcfowler's full-sized avatar
🏍️
...

Forrest Fowler fcfowler

🏍️
...
View GitHub Profile
@fcfowler
fcfowler / gist:8443033
Last active January 3, 2016 09:29
Get current weather with "weather" command in the terminal
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>//'"
@fcfowler
fcfowler / directive.js
Created December 9, 2013 01:15
Non gif loading directive using spin.js
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;