<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Expendable Words &#187; Play</title>
	<atom:link href="http://www.expendablewords.com/category/play/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.expendablewords.com</link>
	<description>No guarantees on quality or cohesiveness. Read at your own risk.</description>
	<lastBuildDate>Sat, 26 Sep 2009 15:14:53 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>My Online Photo Strategy</title>
		<link>http://www.expendablewords.com/2009/01/03/my-online-photo-strategy/</link>
		<comments>http://www.expendablewords.com/2009/01/03/my-online-photo-strategy/#comments</comments>
		<pubDate>Sat, 03 Jan 2009 14:44:56 +0000</pubDate>
		<dc:creator>Doug</dc:creator>
				<category><![CDATA[Play]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Flickr]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Photography]]></category>

		<guid isPermaLink="false">http://www.expendablewords.com/?p=131</guid>
		<description><![CDATA[A few months ago I had a dilemma&#8230; I wanted to post some photos of my vacation, but wasn&#8217;t sure where to put them. I have a Flickr account, Facebook account and MobileMe account, all of which provide this capability, but I didn&#8217;t want to duplicate them everywhere. In the end, I decided to use [...]]]></description>
			<content:encoded><![CDATA[<p>A few months ago I had a dilemma&#8230; I wanted to post some photos of my vacation, but wasn&#8217;t sure where to put them. I have a Flickr account, Facebook account and MobileMe account, all of which provide this capability, but I didn&#8217;t want to duplicate them everywhere. In the end, I decided to use all of those services, each with a different group of photos. Here&#8217;s the breakdown:</p>
<ul>
<li>Flickr is where I put my &#8220;artsy&#8221; pictures, mainly the ones that I take with my Digital SLR.</li>
<li>Facebook is where I put my &#8220;best of&#8221; personal pictures. I try to limit the number here since most Facebook friends probably aren&#8217;t interested in going through 200 vacation photos.</li>
<li>MobileMe is where I put all of my personal pics. This is primarily for family who doesn&#8217;t mind going through tons of photos. It also provides lots (10 GB) of storage and the option to download high rez versions of each photo.</li>
</ul>
<p>All of this centers around iPhoto, where I store everything. I have two separate libraries, one with all of my personal photos, and one with all my DSLR photos. I usually end up taking a ton of mediocre photos with the DSLR in order to score a few keepers, so I didn&#8217;t want to have all that mixed into my main library. After everything is in iPhoto, I use several tools to get them out onto the web:</p>
<ul>
<li><a href="http://connectedflow.com/flickrexport/">FlickrExport</a> to upload photos directly to Flickr from iPhoto. It costs £12, but it&#8217;s well worth it for the convenience it provides.</li>
<li><a href="http://developers.facebook.com/iphoto/">Facebook Exporter</a> to upload photos directly to Facebook from iPhoto.</li>
<li>iPhoto&#8217;s built in Web Galleries to upload photos to MobileMe.</li>
</ul>
<p>Once they&#8217;re on the web, I want to let people know about them. For Facebook photos, friends are automatically notified through my timeline, and I use <a href="http://myflickrapp.com/">My Flickr</a> to do the same for Flickr photos. For my MobileMe stuff, I&#8217;ll usually just send a Web Gallery link to anyone who may be interested.</p>
<p>Well there you have it. This took a little time to research and set up, but now that I&#8217;ve done the work, I have an organized photo collection that&#8217;s pretty easy to manage.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.expendablewords.com/2009/01/03/my-online-photo-strategy/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>UK Hotel Wrapup</title>
		<link>http://www.expendablewords.com/2008/11/09/uk-hotel-wrapup/</link>
		<comments>http://www.expendablewords.com/2008/11/09/uk-hotel-wrapup/#comments</comments>
		<pubDate>Sun, 09 Nov 2008 12:19:18 +0000</pubDate>
		<dc:creator>Doug</dc:creator>
				<category><![CDATA[Play]]></category>
		<category><![CDATA[Travel]]></category>

		<guid isPermaLink="false">http://www.expendablewords.com/?p=109</guid>
		<description><![CDATA[Courtney and I put a good amount of effort into researching hotels for our recent trip to the UK, so I wanted to share the places we found and what we thought of them. We did our research online using tripadvisor and straight up googling. With tripadvisor, we went by the rule that too many [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://nycceburns.blogspot.com/">Courtney</a> and I put a good amount of effort into researching hotels for our recent trip to the UK, so I wanted to share the places we found and what we thought of them. We did our research online using <a href="http://www.tripadvisor.com/">tripadvisor</a> and straight up googling. With tripadvisor, we went by the rule that too many glowing reviews probably meant they were stuffing the ballot box, so we looked for hotels with mixed, but mostly positive reviews. Here&#8217;s where we ended up:</p>
<p><strong><a href="http://www.sumnerhotel.com/">The Sumner Hotel</a> (London, England) -</strong> A nice, quiet hotel that&#8217;s outside the main tourist areas (which I liked). It blends right into the block; so much that I didn&#8217;t even know it was the hotel when we first arrived. It&#8217;s very quiet inside (except for the creaky floors) with a B&amp;B type feel in the common areas. The decor is contemporary but conservative; no glitz like you see in many boutique hotels. It&#8217;s about 5 minutes from the Marble Arch tube station, and we were able to easily get wherever we needed from there. We really liked this hotel and would recommend it to anyone who doesn&#8217;t mind being off the beaten path.</p>
<p><strong><a href="http://www.tigerlilyedinburgh.co.uk/">Tigerlily</a> (Edinburgh, Scotland) -</strong> This hotel was rated in the top 65 hotels in the world by Conde Nast Traveler and it definitely deserves it&#8230; it&#8217;s really, really cool. When first shown our room it kind of knocked my socks off &#8211; wide open with high ceilings, high windows and a very contemporary style. I had the same feeling when we came back later that night to find the whole room illuminated by red lights! Appreciation of quality and attention to detail were evident throughout the hotel &#8211; from the decor, to the service, to the food (breakfast was sooo good). Although it&#8217;s pricey, I feel like it&#8217;s a good value for what you receive. I would highly recommend it to anyone who enjoys boutique hotels.</p>
<p><strong><a href="http://www.kingsmillshotel.com/">The Kingsmills Hotel</a> (Inverness, Scotland) -</strong>This hotel was a Marriott at some point, and that&#8217;s just what it feels like &#8211; a Marriott from the mid 90s that hasn&#8217;t been updated and is starting to show its age. The staff wasn&#8217;t overly friendly (and apparently not satisfied with their jobs according to what we overheard in the bar), the decor was slightly dated, and the food was mediocre. The room was clean, but not &#8220;squeaky&#8221; clean. The hotel is certainly acceptable as a place to spend the night, but I feel it&#8217;s overpriced for what you receive. If we went back to Inverness I would look into one of the many B&amp;Bs or guest houses instead.</p>
<p><strong><a href="http://www.theroyalhorseguards.co.uk/">The Royal Horseguards</a> (London, England) -</strong> This place brought the awesome back. It&#8217;s a grand old hotel right on the River Thames. It has a conservative but modern decor and the rooms have recently been updated with all the modern amenities (room key enabled power, TV in the shower, towel warmers, electronic do not disturb, etc.). The staff was friendly and very helpful throughout our short stay. The place is pretty classy (I felt slightly uncomfortable walking through the lobby in jeans while everyone else was in tuxedos), so I don&#8217;t know if I would want to stay for an extended vacation, but it&#8217;s great for a short stay or if you&#8217;re traveling on business (or if you <em>are</em> classy).</p>
<p>That&#8217;s it! We had a great time and are looking forward to our next journey across the pond.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.expendablewords.com/2008/11/09/uk-hotel-wrapup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>UK Photo Favorites (or Favourites)</title>
		<link>http://www.expendablewords.com/2008/11/01/uk-photo-favorites-or-favourites/</link>
		<comments>http://www.expendablewords.com/2008/11/01/uk-photo-favorites-or-favourites/#comments</comments>
		<pubDate>Sat, 01 Nov 2008 12:10:38 +0000</pubDate>
		<dc:creator>Doug</dc:creator>
				<category><![CDATA[Play]]></category>
		<category><![CDATA[Photography]]></category>
		<category><![CDATA[Travel]]></category>

		<guid isPermaLink="false">http://www.expendablewords.com/?p=105</guid>
		<description><![CDATA[I&#8217;m just back from a Trip to the UK where we visited London, Edinburgh and Inverness. Here are a few of my favorite photos from the trip. All were taken with my new(ish) Nikon D60. The full album is available here.
]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m just back from a Trip to the UK where we visited London, Edinburgh and Inverness. Here are a few of my favorite photos from the trip. All were taken with my new(ish) Nikon D60. The full album is available <a href="http://www.flickr.com/photos/dwbdc/sets/72157608475919773/">here</a>.</p>
<div class="flickr-photos"><a class="tt-flickr tt-flickr-Square" href="http://www.flickr.com/photos/dwbdc/2983138347/" rel="album-72157608475919773" id="photo-2983138347" title="Big Ben"><img src="http://farm4.static.flickr.com/3196/2983138347_0197d336b9_s.jpg" width="75" height="75" alt="Big Ben" /></a> <a class="tt-flickr tt-flickr-Square" href="http://www.flickr.com/photos/dwbdc/2983995290/" rel="album-72157608475919773" id="photo-2983995290" title="Roundabout"><img src="http://farm4.static.flickr.com/3167/2983995290_d23938af46_s.jpg" width="75" height="75" alt="Roundabout" /></a> <a class="tt-flickr tt-flickr-Square" href="http://www.flickr.com/photos/dwbdc/2983995718/" rel="album-72157608475919773" id="photo-2983995718" title="Nelson&#039;s Column"><img src="http://farm4.static.flickr.com/3190/2983995718_d788b529ba_s.jpg" width="75" height="75" alt="Nelson&#039;s Column" /></a> <a class="tt-flickr tt-flickr-Square" href="http://www.flickr.com/photos/dwbdc/2986567362/" rel="album-72157608475919773" id="photo-2986567362" title="Telephone"><img src="http://farm4.static.flickr.com/3247/2986567362_af22849682_s.jpg" width="75" height="75" alt="Telephone" /></a> <a class="tt-flickr tt-flickr-Square" href="http://www.flickr.com/photos/dwbdc/2983140361/" rel="album-72157608475919773" id="photo-2983140361" title="Edinburgh Castle"><img src="http://farm4.static.flickr.com/3048/2983140361_7cfda94fd3_s.jpg" width="75" height="75" alt="Edinburgh Castle" /></a> <a class="tt-flickr tt-flickr-Square" href="http://www.flickr.com/photos/dwbdc/2983997356/" rel="album-72157608475919773" id="photo-2983997356" title="East Princes Street Gardens"><img src="http://farm4.static.flickr.com/3245/2983997356_75a28d050a_s.jpg" width="75" height="75" alt="East Princes Street Gardens" /></a> <a class="tt-flickr tt-flickr-Square" href="http://www.flickr.com/photos/dwbdc/2983998328/" rel="album-72157608475919773" id="photo-2983998328" title="Scott Monument"><img src="http://farm4.static.flickr.com/3032/2983998328_cc8ec55fe7_s.jpg" width="75" height="75" alt="Scott Monument" /></a> <a class="tt-flickr tt-flickr-Square" href="http://www.flickr.com/photos/dwbdc/2983999102/" rel="album-72157608475919773" id="photo-2983999102" title="Building at Princes and Waverly Bridge"><img src="http://farm4.static.flickr.com/3020/2983999102_2147b6e4a9_s.jpg" width="75" height="75" alt="Building at Princes and Waverly Bridge" /></a> <a class="tt-flickr tt-flickr-Square" href="http://www.flickr.com/photos/dwbdc/2983143519/" rel="album-72157608475919773" id="photo-2983143519" title="Palace of Holyroodhouse"><img src="http://farm4.static.flickr.com/3281/2983143519_54f1b56acb_s.jpg" width="75" height="75" alt="Palace of Holyroodhouse" /></a> <a class="tt-flickr tt-flickr-Square" href="http://www.flickr.com/photos/dwbdc/2983143861/" rel="album-72157608475919773" id="photo-2983143861" title="Edinburgh Castle at Sunset"><img src="http://farm4.static.flickr.com/3212/2983143861_2fdce69cc6_s.jpg" width="75" height="75" alt="Edinburgh Castle at Sunset" /></a> <a class="tt-flickr tt-flickr-Square" href="http://www.flickr.com/photos/dwbdc/2983144825/" rel="album-72157608475919773" id="photo-2983144825" title="Loch Ness"><img src="http://farm4.static.flickr.com/3002/2983144825_d57a545d34_s.jpg" width="75" height="75" alt="Loch Ness" /></a> <a class="tt-flickr tt-flickr-Square" href="http://www.flickr.com/photos/dwbdc/2983145915/" rel="album-72157608475919773" id="photo-2983145915" title="Urquhart Castle"><img src="http://farm4.static.flickr.com/3071/2983145915_f4d6425a24_s.jpg" width="75" height="75" alt="Urquhart Castle" /></a> <a class="tt-flickr tt-flickr-Square" href="http://www.flickr.com/photos/dwbdc/2983146367/" rel="album-72157608475919773" id="photo-2983146367" title="Flag"><img src="http://farm4.static.flickr.com/3011/2983146367_218097c986_s.jpg" width="75" height="75" alt="Flag" /></a> </div>
]]></content:encoded>
			<wfw:commentRss>http://www.expendablewords.com/2008/11/01/uk-photo-favorites-or-favourites/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>AppleTV + Flickr Interestingness</title>
		<link>http://www.expendablewords.com/2008/09/21/appletv-flickr-interestingness/</link>
		<comments>http://www.expendablewords.com/2008/09/21/appletv-flickr-interestingness/#comments</comments>
		<pubDate>Mon, 22 Sep 2008 00:04:33 +0000</pubDate>
		<dc:creator>Doug</dc:creator>
				<category><![CDATA[Play]]></category>
		<category><![CDATA[AppleTV]]></category>
		<category><![CDATA[Flickr]]></category>

		<guid isPermaLink="false">http://www.expendablewords.com/?p=86</guid>
		<description><![CDATA[UPDATE: One change from the original&#8230; It now only selects photos with a Creative Commons license. This means there are less than 250 new photos each day. To maintain the 250 photo set, it adds all the new photos and drops the same number of the oldest photos. That way there are always approximately 250 [...]]]></description>
			<content:encoded><![CDATA[<p><strong>UPDATE: One change from the original&#8230; It now only selects photos with a Creative Commons license. This means there are less than 250 new photos each day. To maintain the 250 photo set, it adds all the new photos and drops the same number of the oldest photos. That way there are always approximately 250 photos. For example, if there are 30 new photos one day, they will be added and the 30 oldest will be removed.</strong></p>
<p>When at home, I listen to most of my music through AppleTV. This means the TV is on a lot, so I&#8217;d like an interesting screen saver. Unfortunately, AppleTV falls a little short in this area. It can rotate a set of photos as the screen saver, but you can only choose from a small group of Apple photos, your own iPhoto collection, or photos from a specific Flickr account. I like my photos, but don&#8217;t want to look at them all the time, and I had a hard time finding a Flickr user with a large enough album to keep things interesting.</p>
<p>What I really wanted was a way to display the Flickr <a href="http://www.flickr.com/explore/interesting/">interestingness</a> collection. Interestingness is a pool of, you guessed it&#8230; interesting photos, that changes all the time. Unfortunately, since AppleTV only provides the ability to link to specific Flickr accounts, you can&#8217;t access this dynamic collection.</p>
<p>After searching for a solution, and inspired by this <a href="http://blog.ifbydesign.com/2007/09/17/flickr-to-apple-tv-how-to-automatically-download-a-daily-dose-of-interesting-photos/">post</a>, I finally came up with workaround. It&#8217;s a script that queries photos from <em>interestingness</em> via the Flickr API, then adds them as favorites to a special Flickr account I created called <a href="http://www.flickr.com/photos/dailypool/favorites/">dailypool</a>. The script runs every night, so there are always fresh photos. Since this Flickr account can be viewed by anyone, you can easily link to it on your own AppleTV.</p>
<p>Here&#8217;s what you need to do to set it up. This assumes you&#8217;re using AppleTV v2.</p>
<p><strong>Add the dailypool Flickr account:</strong></p>
<ol>
<li>On your remote, press <em>Menu</em> to get to the main menu</li>
<li>Select <em>Photos</em> in the left menu, then <em>Flickr</em> in the right menu</li>
<li>Select <em>Add Flickr Contact</em>, then type <em>dailypool</em> using the onscreen keyboard</li>
</ol>
<p><strong>Set dailypool favorites as your screen saver</strong></p>
<ol>
<li>Press the <em>Menu</em> button on the remote until you get back to the main menu</li>
<li>Select <em>Settings</em> in the left menu, then <em>Screen Saver</em> in the right menu</li>
<li>On the <em>Screen Saver</em> screen, scroll down to and select the <em>Slideshow</em> menu</li>
<li>On the <em>Choose Photos</em> screen, select <em>Flickr</em>, then select <em>dailypool</em>, then <em>favorites</em></li>
<li>Press the Menu button on the remote until you get back to the main menu</li>
</ol>
<p>That&#8217;s it! Next time your AppleTV goes into screen saver mode it should display interestingness photos that will be refreshed every day. Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.expendablewords.com/2008/09/21/appletv-flickr-interestingness/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>NYC Waterfall Photos</title>
		<link>http://www.expendablewords.com/2008/09/03/nyc-waterfall-photos/</link>
		<comments>http://www.expendablewords.com/2008/09/03/nyc-waterfall-photos/#comments</comments>
		<pubDate>Wed, 03 Sep 2008 11:08:57 +0000</pubDate>
		<dc:creator>Doug</dc:creator>
				<category><![CDATA[Play]]></category>
		<category><![CDATA[Photography]]></category>

		<guid isPermaLink="false">http://www.expendablewords.com/?p=45</guid>
		<description><![CDATA[A few weeks ago, I went up to the Brooklyn Bridge to play around with my new Nikon D60. The NYC Waterfalls are on through mid October, and they provided some great subject matter. Here are a few of my favorites. Click any photo to view the full size version on Flickr.
]]></description>
			<content:encoded><![CDATA[<p>A few weeks ago, I went up to the Brooklyn Bridge to play around with my new Nikon D60. The <a href="http://www.nycwaterfalls.org/">NYC Waterfalls</a> are on through mid October, and they provided some great subject matter. Here are a few of my favorites. Click any photo to view the full size version on Flickr.</p>
<div class="flickr-photos"><a class="tt-flickr tt-flickr-Square" href="http://www.flickr.com/photos/dwbdc/2795420464/" rel="album-72157607005226153" id="photo-2795420464" title="Waterfall 1 - Taken from the north side of Brooklyn Bridge"><img src="http://farm4.static.flickr.com/3235/2795420464_bdc3fc442d_s.jpg" width="75" height="75" alt="Waterfall 1" /></a> <a class="tt-flickr tt-flickr-Square" href="http://www.flickr.com/photos/dwbdc/2795418610/" rel="album-72157607005226153" id="photo-2795418610" title="Waterfall 2 - Waterfall under the Brooklyn Bridge with lower Manahattan in the background."><img src="http://farm4.static.flickr.com/3113/2795418610_5874155c41_s.jpg" width="75" height="75" alt="Waterfall 2" /></a> <a class="tt-flickr tt-flickr-Square" href="http://www.flickr.com/photos/dwbdc/2794567725/" rel="album-72157607005226153" id="photo-2794567725" title="Waterfall 3 - Taken from the south side of the Brooklyn Bridge. Empire State Building in the background."><img src="http://farm4.static.flickr.com/3195/2794567725_286b591fa8_s.jpg" width="75" height="75" alt="Waterfall 3" /></a> <a class="tt-flickr tt-flickr-Square" href="http://www.flickr.com/photos/dwbdc/2795416484/" rel="album-72157607005226153" id="photo-2795416484" title="Waterfall 4 - Taken from the south side of the bridge."><img src="http://farm4.static.flickr.com/3195/2795416484_58137f7588_s.jpg" width="75" height="75" alt="Waterfall 4" /></a> <a class="tt-flickr tt-flickr-Square" href="http://www.flickr.com/photos/dwbdc/2806994091/" rel="album-72157607005226153" id="photo-2806994091" title="Manhattan Waterfall - Taken from the park under the Manhattan Bridge."><img src="http://farm4.static.flickr.com/3244/2806994091_a22e2a960e_s.jpg" width="75" height="75" alt="Manhattan Waterfall" /></a> </div>
]]></content:encoded>
			<wfw:commentRss>http://www.expendablewords.com/2008/09/03/nyc-waterfall-photos/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Automatic My Coke Rewards Code Entry</title>
		<link>http://www.expendablewords.com/2008/09/01/automatic-my-coke-rewards-code-entry/</link>
		<comments>http://www.expendablewords.com/2008/09/01/automatic-my-coke-rewards-code-entry/#comments</comments>
		<pubDate>Mon, 01 Sep 2008 23:00:07 +0000</pubDate>
		<dc:creator>Doug</dc:creator>
				<category><![CDATA[Play]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://www.expendablewords.com/?p=47</guid>
		<description><![CDATA[Until recently I had a large backlog of My Coke Rewards points. In addition to all the codes I collected myself, I also received quite a few from my friends and family (Thanks!). The problem is that the site only allows you to redeem 10 codes per day, and I had a hard time remembering [...]]]></description>
			<content:encoded><![CDATA[<p>Until recently I had a large backlog of <em>My Coke Rewards</em> points. In addition to all the codes I collected myself, I also received quite a few from my friends and family (Thanks!). The problem is that the site only allows you to redeem 10 codes per day, and I had a hard time remembering to enter them every day.</p>
<p>To help, I created a Ruby script for automatically processing codes. Every day, it reads 10 codes from a text file, then submits them to mycokerewards.com and logs the result. That way, I could just add all my codes to a file and it would take care of the rest.</p>
<p>I&#8217;ve provided the script below, as well as instructions for configuring it on a Mac (should be similar  on Unix/Linux). If you&#8217;re using Windows, you can do the same thing by downloading Ruby and setting up a scheduled task. This isn&#8217;t the most user-friendly process, so a little development and/or command line experience would be helpful, but if you don&#8217;t have that you should be able to work it out by stepping through the instructions. Good luck and happy redeeming!</p>
<p><span id="more-47"></span><br />
<strong>Here&#8217;s the code</strong><br/></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
</pre></td><td class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'xmlrpc/client'</span>
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'logger'</span>
&nbsp;
<span style="color:#9966CC; font-weight:bold;">class</span> McrSender 
  @@SERVICE_URL = <span style="color:#996600;">&quot;https://secure.mycokerewards.com/xmlrpc&quot;</span>
&nbsp;
  <span style="color:#9966CC; font-weight:bold;">def</span> initialize<span style="color:#006600; font-weight:bold;">&#40;</span>codeFile, logFile, readCount, username, password<span style="color:#006600; font-weight:bold;">&#41;</span>
    <span style="color:#0066ff; font-weight:bold;">@codeFile</span> = codeFile
	<span style="color:#0066ff; font-weight:bold;">@logFile</span> = logFile
    <span style="color:#0066ff; font-weight:bold;">@readCount</span> = readCount
    <span style="color:#0066ff; font-weight:bold;">@username</span> = username
    <span style="color:#0066ff; font-weight:bold;">@password</span> = password
    <span style="color:#0066ff; font-weight:bold;">@logger</span> = <span style="color:#CC00FF; font-weight:bold;">Logger</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span>@logFile<span style="color:#006600; font-weight:bold;">&#41;</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
  <span style="color:#9966CC; font-weight:bold;">def</span> send_codes
    i = <span style="color:#006666;">1</span>
    <span style="color:#008000; font-style:italic;"># read file into an array</span>
    lines = <span style="color:#CC00FF; font-weight:bold;">File</span>.<span style="color:#CC0066; font-weight:bold;">readlines</span><span style="color:#006600; font-weight:bold;">&#40;</span>@codeFile<span style="color:#006600; font-weight:bold;">&#41;</span>
    lineCount = lines.<span style="color:#9900CC;">length</span>
&nbsp;
    <span style="color:#9966CC; font-weight:bold;">if</span><span style="color:#006600; font-weight:bold;">&#40;</span>lineCount <span style="color:#006600; font-weight:bold;">&gt;</span> <span style="color:#006666;">0</span> <span style="color:#9966CC; font-weight:bold;">and</span> lines<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006666;">0</span><span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#9900CC;">strip</span>.<span style="color:#9900CC;">length</span> <span style="color:#006600; font-weight:bold;">&gt;</span> <span style="color:#006666;">0</span><span style="color:#006600; font-weight:bold;">&#41;</span>
      <span style="color:#008000; font-style:italic;"># login</span>
      <span style="color:#9966CC; font-weight:bold;">if</span><span style="color:#006600; font-weight:bold;">&#40;</span>login == <span style="color:#0000FF; font-weight:bold;">true</span><span style="color:#006600; font-weight:bold;">&#41;</span>
        <span style="color:#0066ff; font-weight:bold;">@logger</span>.<span style="color:#9900CC;">info</span> <span style="color:#996600;">&quot;Successfully logged in.&quot;</span>
&nbsp;
        <span style="color:#CC0066; font-weight:bold;">puts</span> lineCount
&nbsp;
        <span style="color:#008000; font-style:italic;"># process items and remove them from the array</span>
        i = <span style="color:#006666;">0</span>
        <span style="color:#9966CC; font-weight:bold;">while</span> <span style="color:#006600; font-weight:bold;">&#40;</span>i <span style="color:#006600; font-weight:bold;">&lt;</span> <span style="color:#0066ff; font-weight:bold;">@readCount</span> <span style="color:#006600; font-weight:bold;">&amp;&amp;</span> i <span style="color:#006600; font-weight:bold;">&lt;</span> lineCount<span style="color:#006600; font-weight:bold;">&#41;</span>
          code = lines<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006666;">0</span><span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#CC0066; font-weight:bold;">chomp</span>
          send_code<span style="color:#006600; font-weight:bold;">&#40;</span>code<span style="color:#006600; font-weight:bold;">&#41;</span>
          lines.<span style="color:#9900CC;">delete_at</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006666;">0</span><span style="color:#006600; font-weight:bold;">&#41;</span>
          i <span style="color:#006600; font-weight:bold;">+</span>= <span style="color:#006666;">1</span>
        <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
        <span style="color:#008000; font-style:italic;"># write array back to file</span>
        <span style="color:#CC00FF; font-weight:bold;">File</span>.<span style="color:#CC0066; font-weight:bold;">open</span><span style="color:#006600; font-weight:bold;">&#40;</span>@codeFile, <span style="color:#996600;">&quot;w&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>file<span style="color:#006600; font-weight:bold;">|</span>
          file.<span style="color:#CC0066; font-weight:bold;">puts</span><span style="color:#006600; font-weight:bold;">&#40;</span>lines.<span style="color:#9900CC;">join</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
        <span style="color:#9966CC; font-weight:bold;">end</span>
      <span style="color:#9966CC; font-weight:bold;">else</span>
        <span style="color:#0066ff; font-weight:bold;">@logger</span>.<span style="color:#9900CC;">error</span> <span style="color:#996600;">&quot;Could not login with username '#{@username}' and password '#{@password}'.&quot;</span>
      <span style="color:#9966CC; font-weight:bold;">end</span>
    <span style="color:#9966CC; font-weight:bold;">else</span>
      <span style="color:#0066ff; font-weight:bold;">@logger</span>.<span style="color:#9900CC;">info</span> <span style="color:#996600;">&quot;No codes found in code file (or the first line is empty). Exiting.&quot;</span>
    <span style="color:#9966CC; font-weight:bold;">end</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
  private
    <span style="color:#9966CC; font-weight:bold;">def</span> send_code<span style="color:#006600; font-weight:bold;">&#40;</span>code<span style="color:#006600; font-weight:bold;">&#41;</span>
      args = <span style="color:#006600; font-weight:bold;">&#123;</span><span style="color:#996600;">'emailAddress'</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#0066ff; font-weight:bold;">@username</span>, <span style="color:#996600;">'password'</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#0066ff; font-weight:bold;">@password</span>, <span style="color:#996600;">'screenName'</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">' '</span>, <span style="color:#996600;">'capCode'</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> code, <span style="color:#996600;">'VERSION'</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'3.0'</span><span style="color:#006600; font-weight:bold;">&#125;</span>
      service = <span style="color:#6666ff; font-weight:bold;">XMLRPC::Client</span>.<span style="color:#9900CC;">new2</span><span style="color:#006600; font-weight:bold;">&#40;</span>@@SERVICE_URL<span style="color:#006600; font-weight:bold;">&#41;</span>
      result = service.<span style="color:#9900CC;">call</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'points.enterCode'</span>, args<span style="color:#006600; font-weight:bold;">&#41;</span>
      <span style="color:#9966CC; font-weight:bold;">if</span><span style="color:#006600; font-weight:bold;">&#40;</span>result<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006666;">0</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'ENTER_CODE_RESULT'</span><span style="color:#006600; font-weight:bold;">&#93;</span> == <span style="color:#996600;">&quot;true&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
        earned = result<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006666;">0</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'POINTS_EARNED'</span><span style="color:#006600; font-weight:bold;">&#93;</span>
        <span style="color:#0066ff; font-weight:bold;">@logger</span>.<span style="color:#9900CC;">info</span> <span style="color:#996600;">&quot;Successfully entered code '#{code}' Points earned '#{earned}'. &quot;</span>
      <span style="color:#9966CC; font-weight:bold;">else</span>
        message = result<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006666;">0</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'MESSAGES'</span><span style="color:#006600; font-weight:bold;">&#93;</span>
        <span style="color:#0066ff; font-weight:bold;">@logger</span>.<span style="color:#9900CC;">error</span> <span style="color:#996600;">&quot;Error entering code '#{code}'. Error message: '#{message}'.&quot;</span>
      <span style="color:#9966CC; font-weight:bold;">end</span>
    <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
    <span style="color:#9966CC; font-weight:bold;">def</span> login
      args = <span style="color:#006600; font-weight:bold;">&#123;</span><span style="color:#996600;">'emailAddress'</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#0066ff; font-weight:bold;">@username</span>, <span style="color:#996600;">'password'</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#0066ff; font-weight:bold;">@password</span>, <span style="color:#996600;">'screenName'</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">' '</span>, <span style="color:#996600;">'VERSION'</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'3.0'</span><span style="color:#006600; font-weight:bold;">&#125;</span>
      service = <span style="color:#6666ff; font-weight:bold;">XMLRPC::Client</span>.<span style="color:#9900CC;">new2</span><span style="color:#006600; font-weight:bold;">&#40;</span>@@SERVICE_URL<span style="color:#006600; font-weight:bold;">&#41;</span>
      result = service.<span style="color:#9900CC;">call</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'points.pointsBalance'</span>, args<span style="color:#006600; font-weight:bold;">&#41;</span>
      result<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006666;">0</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'LOGIN_RESULT'</span><span style="color:#006600; font-weight:bold;">&#93;</span> == <span style="color:#996600;">&quot;true&quot;</span>
    <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
sender = McrSender.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;codes.txt&quot;</span>, <span style="color:#996600;">&quot;log.txt&quot;</span>, <span style="color:#006666;">10</span>, <span style="color:#996600;">&quot;YOUR_EMAIL&quot;</span>, <span style="color:#996600;">&quot;YOUR_PASSWORD&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
sender.<span style="color:#9900CC;">send_codes</span></pre></td></tr></table></div>

<p><strong>How to install</strong><br/></p>
<ol>
<li>
Make sure Ruby is installed on your Mac. (It is by default in Leopard). You can open terminal and type the following to check. It will return the Ruby version if it&#8217;s installed.</p>
<pre>
ruby -v
</pre>
</li>
<li>
Download the <a href='http://www.expendablewords.com/wp-content/uploads/2008/09/mcrsender.zip'>zip file</a> containing the script, code file and log file.
</li>
<li>
Extract the archive, the move the McrSender folder to the desired location. I&#8217;ll use <em>/Users/doug</em> for the remaining instructions. Replace <em>/Users/doug</em> with your own path.
</li>
<li>
In the bottom two lines of McrSender.rb, change &#8220;codes.txt&#8221; to the full path to your codes.txt file, &#8220;log.txt&#8221; to the full path to your log.txt file, &#8220;YOUR_EMAIL&#8221; to the email address you use for My Coke Rewards, and &#8220;YOUR_PASSWORD&#8221; to the password you use for My Coke Rewards. (NOTE: All of these values should be surrounded in double quotes)
</li>
<li>
Add your My Coke Rewards Codes to the codes.txt file. There should be one code per line.
</li>
<li>
Open terminal then type the following commands to change permissions on the Ruby script to make it executable and on the codes.txt and log.txt files to make them readable and writable.</p>
<pre>
cd /Users/doug
chmod 755 McrSender.rb
chmod 666 codes.txt
chmod 666 log.txt
</pre>
</li>
<li>
Create a cron job to run the script every day. Again, in Terminal type:</p>
<pre>
EDITOR=nano
crontab -e
</pre>
<p>Your cron file will open up in the nano command line text editor. Add the following line to run the script at 6:00 am every morning:</p>
<pre>
0 6 * * * ruby /Users/dwburns/scripts/McrSender/McrSender.rb
</pre>
<p>(Again, change the path to your own path).
</li>
</ol>
<p>You can test it the first time by running (something like) the following in Terminal:</p>
<pre>
/Users/doug/McrSender/McrSender.rb
</pre>
<p><br/></p>
]]></content:encoded>
			<wfw:commentRss>http://www.expendablewords.com/2008/09/01/automatic-my-coke-rewards-code-entry/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>1984</title>
		<link>http://www.expendablewords.com/2008/08/23/1984/</link>
		<comments>http://www.expendablewords.com/2008/08/23/1984/#comments</comments>
		<pubDate>Sun, 24 Aug 2008 03:22:10 +0000</pubDate>
		<dc:creator>Doug</dc:creator>
				<category><![CDATA[Cheers]]></category>
		<category><![CDATA[Play]]></category>
		<category><![CDATA[Books]]></category>

		<guid isPermaLink="false">http://www.expendablewords.com/?p=28</guid>
		<description><![CDATA[I have a bunch of commuting time on my hands these days, so I decided to start reading (well actually listening to) all of the books that I should have read in high school. This includes books that weren&#8217;t on my curriculum (but everyone seems to have read),  as well as the books I was [...]]]></description>
			<content:encoded><![CDATA[<div class="wp-caption alignleft" style="width: 185px"><img src="http://www.audible.com/audiblewords/content/bk/blak/002238/t4_image.jpg" alt="Cover of 1984 By George Orwell " width="175" height="175" /><p class="wp-caption-text">Cover of 1984 By George Orwell </p></div>
<p>I have a bunch of commuting time on my hands these days, so I decided to start reading (well actually listening to) all of the books that I should have read in high school. This includes books that weren&#8217;t on my curriculum (but everyone seems to have read),  as well as the books I was supposed to read, but didn&#8217;t since I was such an awful, awful student.</p>
<p>First on my list was 1984 (this one falls into the &#8220;not on curriculum&#8221; category). I&#8217;m, a long time Mac fan and have wanted to read this since first seeing  <a href="http://www.youtube.com/watch?v=OYecfV3ubP8">Apple&#8217;s 1984 commercial</a>, but just didn&#8217;t find the time till now.</p>
<p>After finishing it, I have to say it&#8217;s one of my favorite books of all time. Incredibly intense, incredibly depressing, incredibly thought provoking, and incredibly awesome. It&#8217;s classic for a reason; the writing is impeccable and absorbs you from the first moment. In addition, the narration by Simon Prebble in the Audible audiobook version is incredible.</p>
<p>If you haven&#8217;t read it, I highly recommend you do. If you have, take a few hours to re-&#8221;read&#8221; the audiobook version. It&#8217;s great stuff.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.expendablewords.com/2008/08/23/1984/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
