Print a random tweet from the command line
By pasting the following small function into your .profile, you’ll be able to print random tweets from any Twitter feed:
Once the code is saved into your .profile just type ‘randomosx’ to get a random tweet:
New: iMac Touch runs both Mac OS X and iOS http://osxdaily.com/2010/08/23/imac-touch-runs-mac-ios/ #apple #mac
In the example code, we are using the OS X Daily Twitter feed, but “shitmydadsays” and “ConanOBrien” both make for a hilarious random tweets. You can also change the function name to something like ‘randomtweet’ or whatever else to fit the feed you are randomizing.
This works in Mac OS X and Linux, and should work in other unix environments as well.
If you like this, why not learn to post tweets from the command line too? Have fun!