Skip to content

Instantly share code, notes, and snippets.

View bjgreenberg's full-sized avatar

Brian J. Greenberg bjgreenberg

View GitHub Profile
@martinpannier
martinpannier / gist:591394
Created September 22, 2010 09:14
Thanks to Brian Greenberg (http://briangreenberg.net) for the original code. This code is for use in GeekTool to display a quote, properly formatted from quotesource.
quotesource=http://www.quotedb.com/quote/quote.php?action=random_quote
curl -s ${quotesource} |sed -e :a -e 's/<[^>]*>//g;/</N;//ba' | \
sed -e s/document.write\(\'//g | \
sed -e s/\'\)\;//g | \
sed -e s/\`/\'/g | \
sed 's/More quotes from / – /g'| \
sed '$!N;s/\n/ /'