<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">

  <title><![CDATA[Blog | Donnie Ray Jones]]></title>
  <link href="https://blog.donnierayjones.com/atom.xml" rel="self"/>
  <link href="https://blog.donnierayjones.com/"/>
  <updated>2016-01-20T21:03:07-06:00</updated>
  <id>https://blog.donnierayjones.com/</id>
  <author>
    <name><![CDATA[Donnie Ray Jones]]></name>
    
  </author>
  <generator uri="http://octopress.org/">Octopress</generator>

  
  <entry>
    <title type="html"><![CDATA[Day One Book v2.0]]></title>
    <link href="https://blog.donnierayjones.com/2016/01/day-one-book-v2-dot-0/"/>
    <updated>2016-01-20T20:17:48-06:00</updated>
    <id>https://blog.donnierayjones.com/2016/01/day-one-book-v2-dot-0</id>
    <content type="html"><![CDATA[<p>In <a href="https://blog.donnierayjones.com/2014/03/publish-day-one-journal-to-book/">Day One Book v1.0</a> I used <a href="https://github.com/donnierayjones/dayone-js-html">HTML and CSS</a>
to turn my Day One Journal entries into a PDF which I could then
print using Blurb. This worked OK, but I wasn&rsquo;t very happy with
the layout and there was quite a bit of wasted space. I was
content though, for a while.</p>

<!-- more -->


<h3>Lightroom Book Module</h3>

<p>Then I came across the <a href="http://tv.adobe.com/watch/getting-started-with-adobe-photoshop-lightroom-4/book-module-basics-/">Book Module in Lightroom</a>.
I&rsquo;ve used Lightroom to edit my photos in the past, but never took
a look behind the Book tab.</p>

<p>The Lightroom Book module allows you to make a photobook from a
collection of your photos. Since our journal is mostly photos I
thought this would be an excellent way to build the book instead.</p>

<h3>Importing Day One into Lightroom</h3>

<p>Creating the book with captions from Day One by hand would be a
HUGE pain though. So I wrote <a href="https://github.com/donnierayjones/dayone-jpeg-metadata">a simple program</a>.
It takes all the Day One entries and embeds the date and entry
text into the metadata of the entries&#8217; associated jpegs. If the
entry does not have a photo it just creates a blank photo for that
entry. Armed with these jpegs I went into Lightroom and imported
them.</p>

<h3>Formatting, Formatting, Formatting</h3>

<p>The Book Module will automatically add captions to the book from
the metadata. But I quickly learned that it cannot read any
formatting what-so-ever. So I still had to manually go into each
entry and format the dates, titles, newlines, etc.</p>

<p>Once I had the text formatted I went through the book rearranging
photos and changing the layout of each page until I liked it.
Since I&rsquo;m not limited with HTML and CSS <strong>I get control of each
page, each entry, and each photo.</strong></p>

<p>It took me about two hours to format each of the books (I made one
for each of our twin girls). But it would have taken a lot more
time to copy/paste the entry text from Day One. It&rsquo;s also much
easier to make mistakes when doing it manually.</p>

<h3>End Result</h3>

<p>Anyway, I&rsquo;m proud of how the books turned out and glad I opted for
the more expensive paper (ProLine Pearl Photo) from Blurb. The
quality of these books is outstanding. They&rsquo;re just over 100 pages
each and cost $75 each after a discount.</p>

<p>Here&rsquo;s some photos of the books. Post questions in the comments. I
hope to write a post detailing the instructions from start to
finish.</p>

<p><img src="https://dl.dropboxusercontent.com/u/51737/images/blog/2016-01-20-day-one-book-with-lightroom-and-blurb/3.jpg" alt="dayone book example" /></p>

<p><img src="https://dl.dropboxusercontent.com/u/51737/images/blog/2016-01-20-day-one-book-with-lightroom-and-blurb/1.jpg" alt="dayone book example" /></p>

<p><img src="https://dl.dropboxusercontent.com/u/51737/images/blog/2016-01-20-day-one-book-with-lightroom-and-blurb/2.jpg" alt="dayone book example" /></p>

<p><img src="https://dl.dropboxusercontent.com/u/51737/images/blog/2016-01-20-day-one-book-with-lightroom-and-blurb/4.jpg" alt="dayone book example" /></p>

<p><img src="https://dl.dropboxusercontent.com/u/51737/images/blog/2016-01-20-day-one-book-with-lightroom-and-blurb/5.jpg" alt="dayone book example" /></p>

<p><img src="https://dl.dropboxusercontent.com/u/51737/images/blog/2016-01-20-day-one-book-with-lightroom-and-blurb/6.jpg" alt="dayone book example" /></p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Amateur Photography]]></title>
    <link href="https://blog.donnierayjones.com/2015/02/ameteur-photography/"/>
    <updated>2015-02-11T21:40:00-06:00</updated>
    <id>https://blog.donnierayjones.com/2015/02/ameteur-photography</id>
    <content type="html"><![CDATA[<p>I&rsquo;m often asked what kind of camera I have and if I have any tips
for getting started in photography. I usually feel uncomfortable
when asked this because I honestly feel like most of the time I
don&rsquo;t know what I&rsquo;m doing. Partly this is because I don&rsquo;t have any
formal training what-so-ever, and partly because I really don&rsquo;t
know what I&rsquo;m doing.</p>

<!--more-->


<p>&ldquo;Amateur&rdquo; has many different meanings and usually has a negative
connotation. But when I say amateur photography I mean: &ldquo;take
photos for fun, not for profit&rdquo;. This post is intended for those
interested in photography just for personal use. If you want to
make money from photography, then I&rsquo;d get advice from a
professional.</p>

<p>You&rsquo;ll often hear professional photographers (i.e.  photographers
that make money from their work) say that &ldquo;the camera doesn&rsquo;t
matter&rdquo;. That&rsquo;s not true at all.</p>

<p>What they might mean is, you don&rsquo;t need a $6,000 camera to take
good photos, and that&rsquo;s true. But spending a good amount of money
(at least $500) on a DSLR will immediately get you better
photos. A lot of it will be luck at first (maybe that&rsquo;s what the
professionals are getting at), but I remember being amazed at the
quality of the photos I started getting when I finally had a
decent camera. Pair a good fast lens with an entry consumer-level
camera, and you&rsquo;ll start getting better photos on day one.</p>

<p>You&rsquo;re not going to be shooting photos that look like they were
shot by a professional, but that&rsquo;s ok, because they weren&rsquo;t!</p>

<p>I started getting serious about photography after my amazing wife
(fiancé at the time) surprised me with a Nikon camera as an
early wedding present.  I had often complained, &ldquo;I wish I had a
good camera so I could get good photos of the dogs.&rdquo; A desire to
learn, a good camera (and lens), and a subject is all you need to
get started.</p>

<h2>My Recommendations</h2>

<ol>
<li>Determine your commitment level (or budget)</li>
<li>Buy a camera</li>
<li>Buy a prime lens</li>
<li>Read <a href="http://www.amazon.com/gp/product/0817439390/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0817439390&amp;linkCode=as2&amp;tag=bldorajo-20&amp;linkId=H6MNVCZ2MUYGTJ2L">Understanding Exposure</a></li>
<li>Shoot!</li>
</ol>


<h3>Determine Your Commitment</h3>

<p>Decide how committed you are and how much you want to spend. If
you want to stay under $1,000, then you&rsquo;ll need to stay in the
consumer-level cameras. If you have $2,000 or more, then you might
look into professional-level cameras.</p>

<p>The major difference between consumer- and professional-level
cameras is the size of the sensor. Manufacturers call it different
things, but in Nikon world (where I live) it&rsquo;s called DX and FX
formats. DX is the cheaper, smaller (cropped) sensor and FX is the
larger, &ldquo;full-frame&rdquo; sensor. The biggest benefit (or the one I
care most about) on the full-frame cameras is that they perform
better in low light. This means you can use natural light inside
buildings and anywhere else where natural light is hard to find.
In low light on a cropped camera you&rsquo;ll either get blurry photos
or photos with a lot of grain/noise. On a bigger full-frame
camera you can increase that ISO without increasing the noise
(there are still limits, though).</p>

<p>Full-frame cameras also typically come with more features, more
buttons, better, faster hardware, etc. The gap is closing slightly
between the high-end cropped and low-end full-frame cameras, but
I&rsquo;d still recommend the full-frame camera if you have the budget.</p>

<h3>Buy a Camera</h3>

<p>Now that you know your commitment, pick a camera. I&rsquo;d say stick
with Nikon or Canon (mostly because that&rsquo;s what I see
professionals using), but feel free to choose anything that has
good reviews. I love my Nikon gear but that&rsquo;s only because my
first camera was a Nikon.</p>

<p>If you&rsquo;re buying Nikon, take a look at <a href="http://nikonrumors.com/prices/">this buying guide on Nikon
Rumors</a>. This lists all the latest models and shows if they&rsquo;re
new or will soon be replaced. Check out <a href="http://en.wikipedia.org/wiki/Template:Nikon_DSLR_cameras">this table on Wikipedia
to find older models of equivalent current offerings</a> if your
budget is tight.</p>

<p>I have the Nikon D600, which has now been replaced by the <a href="http://www.amazon.com/gp/product/B00FOTF8M2/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B00FOTF8M2&amp;linkCode=as2&amp;tag=bldorajo-20&amp;linkId=AJRFQWVICBDBAWSK">Nikon
D610</a>. It&rsquo;s the cheapest professional-level Nikon you can get.</p>

<p>Before the D600 I had the Nikon D60, which is <a href="http://en.wikipedia.org/wiki/Template:Nikon_DSLR_cameras">described as an
upper-entry consumer-level</a>. It&rsquo;s been replaced now and is
comparable to <a href="http://www.amazon.com/gp/product/B00RUBJ7EW/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B00RUBJ7EW&amp;linkCode=as2&amp;tag=bldorajo-20&amp;linkId=YAHGT7EOPR7K6G3P">the Nikon D5500</a>.</p>

<p>An entry-level Nikon D3300 is great too, though. Starting off with
anything is going to yield you better photos than your
point-and-shoot or iPhone. As you get more serious you can upgrade
(this is what I did and continue to do).</p>

<p>Unless you find a great deal on a package, get the DSLR body only.
You&rsquo;ll want a couple hundred dollars left to get a good lens.</p>

<p>Side note: if you&rsquo;ve got a larger budget and need mobility for
your camera, there are mirrorless cameras that are almost as small
as your point-and-shoot but have detachable lenses. I can&rsquo;t offer
any information about them as I have never even seen one in
person, but just know they&rsquo;re an option if you&rsquo;re looking.</p>

<p>Lastly, don&rsquo;t be afraid to buy used or refurbished. My Nikon is a
refurbished camera and it&rsquo;s great. You can also buy an older
model. For example, if you can&rsquo;t afford the Nikon D3300, look at
prices on a D3200. I&rsquo;ve used both Amazon and <a href="http://www.adorama.com/">Adorama</a> to
purchase used or refurbished equipment.</p>

<h3>Buy a Prime Lens</h3>

<p>Spend the rest of your budget on a prime lens. Prime lenses do not
zoom (prime meaning one focal length), but because of that,
they&rsquo;re cheaper to manufacture and they are &ldquo;fast&rdquo;, meaning they
have really wide apertures.</p>

<p>My favorite lens on my D60 was a <a href="http://www.amazon.com/gp/product/B001S2PPT0/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B001S2PPT0&amp;linkCode=as2&amp;tag=bldorajo-20&amp;linkId=HSNT6FEBC2W5Y7PU">35mm prime lens</a>. This is
equivalent to <a href="http://www.amazon.com/gp/product/B004Y1AYAC/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B004Y1AYAC&amp;linkCode=as2&amp;tag=bldorajo-20&amp;linkId=RWLWVKCCCPHC3SOZ">a 50mm prime lens on a full-frame camera</a>, which is
what I have for my Nikon D600, and it&rsquo;s still my favorite lens.
You can get either of these for about $200 new. Used prices
typically don&rsquo;t get much cheaper than new (these lenses retain
their value), but you can always look.</p>

<h3>Read <a href="http://www.amazon.com/gp/product/0817439390/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0817439390&amp;linkCode=as2&amp;tag=bldorajo-20&amp;linkId=H6MNVCZ2MUYGTJ2L"><em>Understanding Exposure</em></a></h3>

<p>You&rsquo;ve got a camera and lens, so now you need to learn the basics.
If you leave your camera in Auto mode, you&rsquo;re wasting your money.
You might get lucky in Auto, but spend a little time and just
learn the basics as you go.</p>

<p><a href="http://www.amazon.com/gp/product/0817439390/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0817439390&amp;linkCode=as2&amp;tag=bldorajo-20&amp;linkId=H6MNVCZ2MUYGTJ2L">Understanding Exposure</a> is the only book I&rsquo;ve read on
photography and the extent of any &ldquo;training&rdquo; I&rsquo;ve had. The author
teaches the exposure triangle (ISO, aperture, and shutter speed)
which is necessary to understand your camera. Once you learn these
you&rsquo;ll know what you can (and can&rsquo;t) do with your camera.</p>

<h2>Shoot!</h2>

<p>Now, time to get some photos of those pups!</p>

<hr />

<h4>My Photography Gear</h4>

<p>For those interested, here&rsquo;s all the gear and software I use for
my photos.</p>

<ul>
<li>Nikon D600 &ndash; <a href="http://www.amazon.com/gp/product/B00FOTF8M2/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B00FOTF8M2&amp;linkCode=as2&amp;tag=bldorajo-20&amp;linkId=AJRFQWVICBDBAWSK">Amazon Link</a></li>
<li>Nikon 50mm Lens (prime lens) &ndash; <a href="http://www.amazon.com/gp/product/B004Y1AYAC/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B004Y1AYAC&amp;linkCode=as2&amp;tag=bldorajo-20&amp;linkId=RWLWVKCCCPHC3SOZ">Amazon Link</a></li>
<li>Nikon 24-85mm Lens (kit lens) &ndash; <a href="http://www.amazon.com/gp/product/B008B14TQ6/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B008B14TQ6&amp;linkCode=as2&amp;tag=bldorajo-20&amp;linkId=RDNHWMENSEYMJPM3">Amazon Link</a></li>
<li>Nikon 70-200mm Lens (zoom lens) &ndash; <a href="http://www.amazon.com/gp/product/B009VZOK0Q/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B009VZOK0Q&amp;linkCode=as2&amp;tag=bldorajo-20&amp;linkId=DITF5OERTDLFMT4Q">Amazon Link</a></li>
<li>Speedlight &ndash; <a href="http://www.amazon.com/gp/product/B004LEAYXY/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B004LEAYXY&amp;linkCode=as2&amp;tag=bldorajo-20&amp;linkId=VPK4N2A7CGPWWZSI">Amazon Link</a></li>
<li>Tripod &ndash; <a href="http://www.amazon.com/gp/product/B001D60LG8/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B001D60LG8&amp;linkCode=as2&amp;tag=bldorajo-20&amp;linkId=JDWHB2TB36IG374E">Amazon Link</a></li>
<li>Camera Bag &ndash; <a href="http://www.amazon.com/gp/product/B000YA1DS4/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B000YA1DS4&amp;linkCode=as2&amp;tag=bldorajo-20&amp;linkId=LSTW3Y76ZR4CTQCW">Amazon Link</a></li>
<li>Spyder4Pro (monitor calibration) &ndash; <a href="http://www.amazon.com/gp/product/B006TF37H8/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B006TF37H8&amp;linkCode=as2&amp;tag=bldorajo-20&amp;linkId=YC3PS5CDX5V5GUU6">Amazon Link</a></li>
<li>Adobe Lightroom &ndash; <a href="http://www.amazon.com/gp/product/B00CH6ATMO/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B00CH6ATMO&amp;linkCode=as2&amp;tag=bldorajo-20&amp;linkId=ACQY3ZM2UNINY4D7">Amazon Link</a></li>
</ul>

]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[The 40 Sqft Standing Office]]></title>
    <link href="https://blog.donnierayjones.com/2015/02/the-40-sqft-standing-office/"/>
    <updated>2015-02-07T22:45:00-06:00</updated>
    <id>https://blog.donnierayjones.com/2015/02/the-40-sqft-standing-office</id>
    <content type="html"><![CDATA[<p>When I began working from home I decided to look into a standing
desk. My primary motivation? I didn&rsquo;t want to pay several hundred
dollars (or more) for a good office chair. Also, I only have about
40 square feet of office space, so a good sized desk with legs and
office chair would leave little room. Apparently, standing desks
are better for your health, too.</p>

<!--more-->


<p>So, for the first iteration of my standing desk, I found <a href="http://www.ikea.com/us/en/catalog/products/80091713/">this
desk</a> <a href="http://www.amazon.com/gp/product/B0050S7CK8/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B0050S7CK8&amp;linkCode=as2&amp;tag=bldorajo-20&amp;linkId=5B6PM7NENLCOX7V5">on Amazon</a> and it served its purpose for over a year.
Note: this “desk” is quite small and probably won&rsquo;t work for most
people (I myself decided it wasn&rsquo;t large enough after a while).
But it&rsquo;s a great cheap option.</p>

<p>Finally I decided I needed something larger and started browsing
IKEA&rsquo;s desks. IKEA sells most (all?) desks as separate pieces &ndash;
the surfaces and the legs. So, it&rsquo;s really easy to find a desktop
surface that will work for you. I decided on the <a href="http://www.ikea.com/us/en/catalog/products/80278287/">HILVER table
top</a> because it fit nicely in the small amount of space I had
available. It&rsquo;s great for a standing desk because it&rsquo;s very, very
lightweight (compared to other IKEA table tops).</p>

<h3>My Current Office</h3>

<p><img src="https://dl.dropboxusercontent.com/u/51737/images/blog/2015-02-07-the-40-sqft-standing-office/current-office.jpg" alt="office" /></p>

<blockquote><p>What&rsquo;s that?? A chair?! I thought this was a standing desk!</p></blockquote>

<p><img src="https://dl.dropboxusercontent.com/u/51737/images/blog/2015-02-07-the-40-sqft-standing-office/chair.jpg" alt="chair" /></p>

<p>So, some days I&rsquo;m just tired. That happens to parents of twins
(ok, that happens to all parents). A tall stool/chair is required
those days you just need to rest your legs for the afternoon. I
went through a couple of stools until I found one that would do.
<a href="http://www.amazon.com/gp/product/B004I3ZRQM/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B004I3ZRQM&amp;linkCode=as2&amp;tag=bldorajo-20&amp;linkId=WTK7HQIJZZJ7W3OO">Here&rsquo;s the one I settled on</a>. It&rsquo;s not perfect, but it&rsquo;s a
great cheap option. It was hard to find one that would match my
desk&rsquo;s height, but this one reached it at its max setting.</p>

<h3>Installation</h3>

<p>To mount a desktop surface to the wall you&rsquo;ll needed heavy duty L
brackets. I picked up 3 for about $20 each at Lowes. But you can
find <a href="http://www.amazon.com/gp/product/B002TII0JY/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B002TII0JY&amp;linkCode=as2&amp;tag=bldorajo-20&amp;linkId=6QJNKE53KY7IKNHO">similar items on Amazon</a>. You&rsquo;ll want to <strong>mount these
into the studs</strong>; drywall won&rsquo;t cut it (<a href="http://instagram.com/p/klcQgZQ6qo">I know from
experience</a>).  The length and durability necessary will depend
on the size and weight of the surface you choose.</p>

<p><img src="https://dl.dropboxusercontent.com/u/51737/images/blog/2015-02-07-the-40-sqft-standing-office/l-brackets.jpg" alt="l brackets" /></p>

<p>To determine how high to mount the desk (this is important) I used
<a href="http://www.thehumansolution.com/ergonomic-office-desk-chair-keyboard-height-calculator.html">The Human Solution calculator</a>.</p>

<p>You&rsquo;ll need hardware to attach the L brackets to the wall (get
some large screws). I predrilled holes into the studs so I
wouldn&rsquo;t burn out the motor in my cheap drill with the large
screws. I used a line laser to ensure the L brackets were
aligned, but you can just use a regular ol&#8217; level if that&rsquo;s all
you have.</p>

<p>Once you have the L brackets up, then you can determine how
you want the desk resting on top of them.</p>

<p>I didn&rsquo;t want the back of the desk to be flush with the wall. If
it&rsquo;s against the wall, then you&rsquo;ll have to run wires along the
desk/wall. Leaving a little space allows the cables to drop
directly below to their destination. The space also allowed me to
mount my monitors with <a href="http://www.amazon.com/gp/product/B000AMJC2K/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B000AMJC2K&amp;linkCode=as2&amp;tag=bldorajo-20&amp;linkId=2CMWUUKWBX7RROWG">these monitor arms</a> to free up some
desk space. I think the style of the bevelled HILVER table I have
actually looks better an inch or two from the wall.</p>

<p><img src="https://dl.dropboxusercontent.com/u/51737/images/blog/2015-02-07-the-40-sqft-standing-office/wall-spacing.jpg" alt="wall spacing" /></p>

<p>Once I had the desk in the position I preferred, I used a pencil
to mark the holes to attach the L brackets to it. Then I
predrilled some small holes into the desk and then placed it back
on the L brackets. Tiny screws are fine here.</p>

<h3>Completed Desk Setup</h3>

<p>I mounted my HILVER desk by myself during my lunch break one day.
It&rsquo;s a pretty easy project.</p>

<p><img src="https://dl.dropboxusercontent.com/u/51737/images/blog/2015-02-07-the-40-sqft-standing-office/the-desk.jpg" alt="standing desk" /></p>

<h3>Cable Management</h3>

<p>My wife had purchased some pegboards for the garage to organize
our tools, so I stole one of the three panels and turned it into a
“server rack.” It saves a lot of space for all of the gear I have
in my office.</p>

<p><img src="https://dl.dropboxusercontent.com/u/51737/images/blog/2015-02-07-the-40-sqft-standing-office/home-server-rack.jpg" alt="pegboard" /></p>

<h3>TV Stand</h3>

<p>A TV stand is a perfect addition to a standing desk. Most of my
gear is mounted to the wall, but the larger items, a printer and
my laptop, are housed in <a href="http://www.wayfair.com/Zipcode-Design-Lily-18-TV-Stand-WF127NWH-ZIPC1034.html">a TV stand I purchased from Wayfair</a>.
Make sure you don&rsquo;t get one that has too much depth though, or you
won&rsquo;t have anywhere to stand. You also need one that doesn&rsquo;t sit
flat on the ground so it&rsquo;ll allow room for a <a href="http://www.amazon.com/gp/product/B000EFK9KM/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B000EFK9KM&amp;linkCode=as2&amp;tag=bldorajo-20&amp;linkId=SDTUJNARBNAHWARO">standing mat</a> to
slide underneath.</p>

<h3>The Hot Water Heater</h3>

<p>Back to my office&hellip;</p>

<p><img src="https://dl.dropboxusercontent.com/u/51737/images/blog/2015-02-07-the-40-sqft-standing-office/current-office.jpg" alt="office" /></p>

<blockquote><p>Wait. Is that a hot water heater in this guy&rsquo;s office?</p></blockquote>

<p>Yep! I named him Wilson.</p>

<p><img src="https://dl.dropboxusercontent.com/u/51737/images/blog/2015-02-07-the-40-sqft-standing-office/wilson.jpg" alt="wilson" /></p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Fix Bootstrap 3 Printing in Google Chrome (and Other Browsers)]]></title>
    <link href="https://blog.donnierayjones.com/2014/10/fix-bootstrap3-printing/"/>
    <updated>2014-10-03T09:12:00-05:00</updated>
    <id>https://blog.donnierayjones.com/2014/10/fix-bootstrap3-printing</id>
    <content type="html"><![CDATA[<p>So, there&rsquo;s <a href="https://github.com/twbs/bootstrap/issues/12078">an issue</a> when printing a website built on top of
Bootstrap 3. It seems the Bootstrap team is punting on the problem
until Bootstrap 4.</p>

<p>The problem is when printing (in Google Chrome or certain
versions Internet Explorer) the mobile layout is rendered.</p>

<p>There are numerous suggestions floating around about how to fix
it, but I didn&rsquo;t like any of them.</p>

<!--more-->


<p>So I decided to see what it&rsquo;d take to get it to work for the
particular app I was working on. This is a pretty small app with
about 10 distinct pages. However, Bootstrap responsive utility
(<code>visible-xs</code>, <code>hidden-xs</code>, <code>hidden-lg</code>, etc) and the responsive
grid (<code>col-sm-2</code>, <code>col-sm-10</code>, etc) classes were littered all over
the markup.</p>

<p>So I decided the solution would be to change the print styles to
use the &ldquo;small&rdquo; (or &ldquo;sm&rdquo;) layout. This got me most of the way
there, and then I had to sprinkle in a few <code>hidden-print</code> styles
in our markup.</p>

<p><strong>Note</strong>: Some of the styles I&rsquo;m working with were deprecated in
Bootstrap 3.2. However, deprecation doesn&rsquo;t mean removal, so I&rsquo;m
still using them. We use these responsive utlities for tables, and
so we didn&rsquo;t want to give them up just yet.</p>

<pre><code>@media print {
    .make-grid(sm);

    .visible-xs {
        .responsive-invisibility();
    }

    .hidden-xs {
        .responsive-visibility();
    }

    .hidden-xs.hidden-print {
        .responsive-invisibility();
    }

    .hidden-sm {
        .responsive-invisibility();
    }

    .visible-sm {
        .responsive-visibility();
    }
}
</code></pre>

<p>The above code references the Less mixins provided by Bootstrap.
If you aren&rsquo;t using Less, then just use the CSS output. I&rsquo;ve made
it available here:</p>

<p><a href="https://gist.github.com/donnierayjones/6fd9802d992b2d8d6cfd">Print CSS Fix for Bootstrap 3</a></p>

<p>I just created this and haven&rsquo;t thoroughly tested it to work for
all scenarios, but it &ldquo;works on my machine.&rdquo; Let me know if you
notice a problem and I&rsquo;ll update the post.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Photo Backup With a Synology NAS and Google Drive]]></title>
    <link href="https://blog.donnierayjones.com/2014/05/photo-backup-with-synology-nas-and-google-drive/"/>
    <updated>2014-05-04T15:35:00-05:00</updated>
    <id>https://blog.donnierayjones.com/2014/05/photo-backup-with-synology-nas-and-google-drive</id>
    <content type="html"><![CDATA[<p>I snap <a href="https://www.flickr.com/photos/donnieray/">a lot of pictures</a>. I&rsquo;ve spent a lot of money on camera
gear to take these pictures. I&rsquo;ve spent a lot of time to take
these pictures, organize them, and share them. It&rsquo;d suck if they
were all lost because of a disk failure, theft, or worse. And it&rsquo;d
be my fault.</p>

<!--more-->


<h2>Cloud Backup is a Necessity</h2>

<p>You need to backup anything that&rsquo;s dear to you &ldquo;to the cloud&rdquo;.
<strong>Simply backing up to another disk in your home is not good
enough</strong>. While that does solve the problem of a disk failure, it
does not solve the problem in the event of:</p>

<ul>
<li>house fire</li>
<li>burglary</li>
<li>double disk failure</li>
</ul>


<h2>Poor Man&rsquo;s Cloud Backup</h2>

<p>Last year I started getting serious about backing up my personal
photos and videos. I wired my old 1 TB external disk to my <a href="http://www.amazon.com/gp/product/B008ABOJKS/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B008ABOJKS&amp;linkCode=as2&amp;tag=bldorajo-20&amp;linkId=CDYRG3UVESCHBDDX">ASUS
router</a> to enable storage over our home network. Then I
purchased <a href="http://www.haystacksoftware.com/arq/">Arq for Mac</a> to backup nightly to <a href="https://aws.amazon.com/glacier/">Amazon
Glacier</a>. This solution worked, but it was <em>SLOW</em>. So I began
searching for a faster and ultimately better solution.</p>

<h2>Synergy with Synology, Google, &amp; Adobe</h2>

<p>In this post I&rsquo;ll detail my current setup that involves the
following tools and services:</p>

<ul>
<li><a href="http://www.amazon.com/gp/product/B00FY6DV3S/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B00FY6DV3S&amp;linkCode=as2&amp;tag=bldorajo-20&amp;linkId=EKR7TPPLQ3UY6ZCZ">Synology NAS</a></li>
<li><a href="https://drive.google.com">Google Drive</a></li>
<li><a href="http://www.amazon.com/gp/product/B00CH6ATMO/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B00CH6ATMO&amp;linkCode=as2&amp;tag=bldorajo-20&amp;linkId=AOZKNTLM7GDS7SPU">Adobe Lightroom</a></li>
</ul>


<h3>Synology NAS with Cloud Sync</h3>

<p><img src="http://f.cl.ly/items/3U0T2l0B082N0f0g092w/synology-screen.png" alt="cloud sync screenshot" /></p>

<p>Earlier this year I purchased a <a href="http://www.amazon.com/gp/product/B00FY6DV3S/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B00FY6DV3S&amp;linkCode=as2&amp;tag=bldorajo-20&amp;linkId=EKR7TPPLQ3UY6ZCZ">Synology NAS</a> and a <a href="http://www.amazon.com/gp/product/B008JJLW4M/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B008JJLW4M&amp;linkCode=as2&amp;tag=bldorajo-20&amp;linkId=5LKGHKV2I63TFGD3">Western
Digital 3 TB Harddrive</a>. I had been saving up for a new lens
for my Nikon DSLR, but decided to redirect that savings into a
better backup solution. I had heard about Synology as a way to
solve the space problem of these fast, small SSDs that are
commonplace in laptops. The Synology software is excellent and
solves the problem perfectly. I was worried about network speeds,
but on a wired Windows 8 laptop I get 90-100 MB/s. I don&rsquo;t achieve
those speeds on my Macbook over wireless, but it&rsquo;s sufficient for
use with Adobe Lightroom (which creates a local cache of preview
images). There are apparently problems with the latest version of
Mac OS X and Samba, but in my experience it is still <em>good enough</em>.</p>

<p>I didn&rsquo;t know about all of the features that I&rsquo;d be getting when I
purchased a <a href="http://www.amazon.com/gp/product/B00FY6DV3S/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B00FY6DV3S&amp;linkCode=as2&amp;tag=bldorajo-20&amp;linkId=EKR7TPPLQ3UY6ZCZ">Synology NAS</a>. I won&rsquo;t list them all here, but
there are tons of <a href="http://www.synology.com/en-us/dsm/index/features">built-in features</a> and <a href="http://www.synology.com/en-us/dsm/app_packages">add-on packages</a>
to turn this little box into a super server.</p>

<p>With the <a href="http://www.synology.com/en-us/dsm/app_packages/CloudSync">Cloud Sync</a> add-on package you can very easily sync
files to Google Drive and/or Dropbox. There&rsquo;s also a package to
backup to Glacier on a schedule, if you prefer that sort of setup.</p>

<h3>Google Drive for Cloud Storage</h3>

<p><img src="http://f.cl.ly/items/2H2B2U1L2d0X3N1A2u31/drive-screen.png" alt="google drive screenshot" /></p>

<p>Just in time for the arrival of my Synology NAS, <a href="http://www.theverge.com/2014/3/13/5505068/google-lowers-google-drive-storage-pricing">Google slashed
prices on Google Drive</a>. These prices matched what Amazon is
offering with Glacier and are 1/10 of Dropbox&rsquo;s prices.
Technically, Glacier is still cheaper &ndash; you only pay for the space
you use, whereas with Google you pay for storage in blocks. But
the experience with Google Drive is worth the few extra dollars
per month.</p>

<p>My previous backup solution to Amazon Glacier was sufficient but
it was not very easy to work with, and the backup only performed
on a schedule (i.e. nightly).</p>

<p>With Google Drive, uploading begins immediately and it&rsquo;s much,
much easier to manage the cloud storage. Google Drive&rsquo;s web
interface is excellent, and I actually prefer it to Mac&rsquo;s Finder
for browsing through my photos and videos.</p>

<p>The best feature of Google Drive is the availability of your files
no matter where you are. With Synology, you have the ability to
VPN home to access your files, but with Google Drive, it&rsquo;s not
even necessary. Just pull up the app on your phone or visit the
website on any desktop computer. Want to share some photos? Just a
click away &ndash; no need to reupload.</p>

<h3>Experience with Adobe Lightroom</h3>

<p><img src="http://f.cl.ly/items/0n2z2D440r0v3Q3s1Z0i/lightroom-screen.png" alt="lightroom screenshot" /></p>

<p><a href="http://www.amazon.com/gp/product/B00CH6ATMO/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B00CH6ATMO&amp;linkCode=as2&amp;tag=bldorajo-20&amp;linkId=AOZKNTLM7GDS7SPU">Adobe Lightroom</a> is the perfect companion for photos stored across
the network. Lightroom generates previews for lightweight local
storage while the RAW image files remain on network storage.
Currently I have a catalog with over 17,000 photos and it&rsquo;s
snappy. I have Lightroom create previews on import from the
camera, and this process does take a few minutes. But once it&rsquo;s
complete your images are on disk, uploading to Google Drive, and
ready for editing.</p>

<h2>Conclusion</h2>

<p>This solution has worked well for me. My photos are backed up and
it doesn&rsquo;t interfere with my workflow for editing and it&rsquo;s pretty
much instant and automatic. If someone breaks into my home and
steals my laptop, my Synology NAS, and my camera, I&rsquo;ll still be
able to access my files on Google&rsquo;s servers.</p>

<p>If you have any questions about my setup, Google Drive, or the
Synology NAS let me know in the comments.</p>

<h2>Update October 3, 2014</h2>

<p>Back in August <a href="http://www.forbes.com/sites/amitchowdhry/2014/08/27/dropbox-drops-price-of-1tb-storage-to-9-99-per-month/">Dropbox dropped prices</a> to match Google Drive.
All of my personal items are in Dropbox so I decided to switch
from Google Drive to Dropbox for the backup. It&rsquo;s pretty simple,
but I did have to upload all the photos again to Dropbox. If
you do the switch as well, just make sure to get everything in
Dropbox before you remove them from Google Drive.</p>

<p>Note: Dropbox is also actually cheaper than Google Drive, if you
pay for a year in advance for $99.</p>

<h2>Update November 11, 2014</h2>

<p>So, couple of updates since my last post. Synology recently
released a new version of their software and Amazon made a big
announcement about unlimited photo storage.</p>

<h3>Selective Sync with Synology DSM 5.1</h3>

<p>Synology recently released DSM 5.1 which has the ability to do
selective sync (among other things). I&rsquo;ve configured mine to only
sync my Photos and Videos which are exclusively stored on my NAS:</p>

<p><img src="https://dl.dropboxusercontent.com/u/51737/images/blog/2014-05-04-photo-backup-with-synology-nas-and-google-drive/synology-selective-sync.png" alt="synology selective sync" /></p>

<p>So now, instead of having my entire Dropbox folder duplicated on my
NAS, just the Photos and Videos folders are there:</p>

<p><img src="https://dl.dropboxusercontent.com/u/51737/images/blog/2014-05-04-photo-backup-with-synology-nas-and-google-drive/finder-nas-folder.png" alt="finder NAS folder" /></p>

<p>Also new to DSM 5.1 are file filters, a maximum file size setting,
and a maximum file history log size. I think the file filters are
pretty good by default. It should get your RAWs and JPEGs, just
double check it to make sure. I&rsquo;m not sure what changing the
&ldquo;Max number of records in history log for each linked account&rdquo;
setting does, but I set it to the maximum value of 100000.</p>

<h3>Unlimited Photo Storage with Amazon Prime</h3>

<p>On November 4th <a href="http://www.engadget.com/2014/11/04/amazon-prime-photos/">Amazon announced Prime Photos</a> which means free
unlimited storage for your photos. This is only for personal
photos apparently, which covers me since this is just a hobby
(sorry professional photogs!)</p>

<p><a href="https://www.amazon.com/clouddrive/primephotos">Prime Photos</a> is a part of Amazon Cloud Drive (which I didn&rsquo;t
even know existed until this announcement). Sadly, it is not one
of the online services that Synology currently integrates with in
the Cloud Sync app. I reached out to Synology about the Amazon
Cloud Drive support  and got this response:</p>

<blockquote><p>  Thank you for your inquiry.</p>

<p>  I will certainly pass your request along to our developers for
  consideration.</p></blockquote>

<p>Which seems like a generic response. However, Synology did respond
to the request for selective sync, and I bet this will eventually
come about. There&rsquo;s <a href="http://forum.synology.com/enu/viewtopic.php?f=3&amp;t=35638">a topic on the Synology forums</a> if you&rsquo;d
like to leave a comment which might help provide motivation for
Synology to add it.</p>

<h2>Update November 19, 2014</h2>

<p>I&rsquo;ve recently setup a better wireless configuration and thought
I&rsquo;d share. I&rsquo;ve purchased an <a href="http://www.amazon.com/gp/product/B00DB9WCR6/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B00DB9WCR6&amp;linkCode=as2&amp;tag=bldorajo-20&amp;linkId=P34OMFCJZMNXUDXZ">Apple AirPort Extreme</a> and
placed it in the room where I do my primary photo editing.  It&rsquo;s
wired (over a Gigabit network) to my main ASUS router that&rsquo;s on the
other side of the house, upstairs. My Macbook Air is the 2011
edition, so it doesn&rsquo;t take advantage of the 802.11ac speeds
offered by the new AirPort Extreme, but I of course have plans to
upgrade my Macbook in the future, and will be able to take
advantage of those speeds then.</p>

<p>My Macbook Air 2011 has 802.11n WiFi, and here are the speeds I&rsquo;m
actually getting when copying files from my NAS to my Macbook over
wireless.</p>

<p>First, a large (approximately 1 GB video):</p>

<p><img src="https://dl.dropboxusercontent.com/u/51737/images/blog/2014-05-04-photo-backup-with-synology-nas-and-google-drive/video-copy-speed.png" alt="video copy speed" /></p>

<p>And photos:</p>

<p><img src="https://dl.dropboxusercontent.com/u/51737/images/blog/2014-05-04-photo-backup-with-synology-nas-and-google-drive/photo-copy-speed.png" alt="photo copy speed" /></p>

<p>I saw it peak at about 18 MB/s which is not terribly bad, and in
fact, feels pretty quick. It took less than a minute to copy the
1GB video.</p>

<p>I&rsquo;d really like to see what speeds I get on a Macbook with
802.11ac. I&rsquo;d recommend the <a href="http://www.amazon.com/gp/product/B00DB9WCR6/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B00DB9WCR6&amp;linkCode=as2&amp;tag=bldorajo-20&amp;linkId=P34OMFCJZMNXUDXZ">Airport Extreme</a> if you&rsquo;re working on a
Mac.</p>

<p><small>
Here&rsquo;s some links to all the equipment I&rsquo;m using.
</small></p>

<p><small>
<a href="http://www.amazon.com/gp/product/B00FY6DV3S/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B00FY6DV3S&amp;linkCode=as2&amp;tag=bldorajo-20&amp;linkId=EKR7TPPLQ3UY6ZCZ">Synology NAS</a>  &ndash; <a href="http://www.amazon.com/gp/product/B008JJLW4M/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B008JJLW4M&amp;linkCode=as2&amp;tag=bldorajo-20&amp;linkId=5LKGHKV2I63TFGD3">Western Digital 3 TB Drive</a> &ndash; <a href="http://www.amazon.com/gp/product/B008ABOJKS/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B008ABOJKS&amp;linkCode=as2&amp;tag=bldorajo-20&amp;linkId=CDYRG3UVESCHBDDX">ASUS Gigabit Router</a> &ndash; <a href="http://www.amazon.com/gp/product/B00DB9WCR6/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B00DB9WCR6&amp;linkCode=as2&amp;tag=bldorajo-20&amp;linkId=P34OMFCJZMNXUDXZ">Apple Airport Extreme</a>
</small></p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Publishing a Day One Journal as a Book]]></title>
    <link href="https://blog.donnierayjones.com/2014/03/publish-day-one-journal-to-book/"/>
    <updated>2014-03-22T13:26:00-05:00</updated>
    <id>https://blog.donnierayjones.com/2014/03/publish-day-one-journal-to-book</id>
    <content type="html"><![CDATA[<p>My wife and I keep a journal of notes to our twin girls in <a href="http://dayoneapp.com/">Day
One</a>. After a year of journaling, I wanted to print the entries
in a physical book for my wife as a Christmas present.</p>

<!--more-->


<p><img src="http://f.cl.ly/items/2C3z3B1w1M3X0k1Z0s0i/Blog-8982.jpg" alt="final-book" /></p>

<p>It was a process to get exactly what I wanted, and this post will
serve as a guide to anyone that wants to do something similar.</p>

<h3><a href="http://dayoneapp.com/">Day One</a> &rarr; HTML &rarr; PDF &rarr; <a href="http://www.blurb.com/">Blurb</a> &rarr; Book</h3>

<hr />

<h2>1. Day One &rarr; HTML</h2>

<h3>Update May 11, 2015</h3>

<p>I recently developed a different approach to this problem. This
should be much easier for most users. You don&rsquo;t need to install
anything. Just visit <a href="https://dayone.donnierayjones.com">https://dayone.donnierayjones.com</a> and
drag-n-drop your Day One journal file. It does still require
Dropbox sync.</p>

<p>I&rsquo;ve removed links to my original version that was much
more difficult for non-programmers to follow. If you want a link
to that just write me a comment below.</p>

<h2>2. HTML &rarr; PDF</h2>

<p>Then I just used Google Chrome&rsquo;s print to PDF feature to get the
PDF I needed. I had to work out the print stylesheet a bit to get
everything to fit nicely into pages and not waste too much
whitespace.</p>

<p>Ultimately, I now had a PDF that I just needed to turn into a
printed book.</p>

<h2>3. PDF &rarr; Blurb</h2>

<p><a href="http://www.blurb.com/">Blurb</a> offers a <a href="http://www.blurb.com/pdf-to-book">PDF to Book</a> service. I had to do some
tweaking to the PDF file&rsquo;s size and format (and it&rsquo;s really too
involved to include in this post), but once I got it all figured
out it was easy to set up in Blurb. You upload a cover image and
the PDF pages and that&rsquo;s all there is to it.</p>

<h2>4. Blurb &rarr; Book</h2>

<p>A few days after submitting the project on Blurb I received my
newly minted book in the mail. The quality of the book is
outstanding considering the price (about $60 for 150 page
hardback).</p>

<p>Here&rsquo;s the final result.</p>

<p><img src="http://f.cl.ly/items/3D0a1n1G1H3Z2j0k0I2s/Blog-8987.jpg" alt="photo-1" /></p>

<p><img src="http://f.cl.ly/items/0X0b0O3C2p1X3a3R0g1z/Blog-8979.jpg" alt="photo-2" /></p>

<p><img src="http://f.cl.ly/items/3b2d0d3X2k2R1R2k361R/Blog-8978.jpg" alt="photo-3" /></p>

<p><img src="http://f.cl.ly/items/1C0m2n1j0j331A1r3T1r/Blog-8989.jpg" alt="photo-4" /></p>

<p>All images in this post are licensed as <a href="https://creativecommons.org/licenses/by/2.0/">Creative Commons &ndash;
Attribution</a>.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[How I Built PandoRdio]]></title>
    <link href="https://blog.donnierayjones.com/2013/02/how-i-build-pandordio/"/>
    <updated>2013-02-19T19:23:00-06:00</updated>
    <id>https://blog.donnierayjones.com/2013/02/how-i-build-pandordio</id>
    <content type="html"><![CDATA[<p><a href="https://chrome.google.com/webstore/detail/pandordio/fiobjnnhnijfdkgdmedcbennfngfnfff">PandoRdio</a> is a Google Chrome Extension that adds a song to your
Rdio collection after you &ldquo;thumbs up&rdquo; a song in Pandora.</p>

<!--more-->


<h3>Easy, Right?</h3>

<p>While the extension is actually a very simple Chrome Extension,
there were a few things I had to put in place to get it to work.
There were a couple roadblocks:</p>

<ul>
<li>Pandora offers no API</li>
<li>The Rdio API has a same origin policy</li>
</ul>


<h3>No Pandora API</h3>

<p>Pandora doesn&rsquo;t offer an API. All I needed to know was when
someone &ldquo;thumbs ups&rdquo; a song, and what the artist and track are.
Because there&rsquo;s no API, I decided to just use a Google Chrome
content script and listen to the <code>click</code> event on the various
&ldquo;thumbs up&rdquo; buttons scattered across www.pandora.com.</p>

<h3>Rdio&rsquo;s Same Origin Policy</h3>

<p>Rdio&rsquo;s API (<a href="http://api.rdio.com/1/">http://api.rdio.com/1/</a>) has a <a href="http://en.wikipedia.org/wiki/Same_origin_policy">same origin policy</a>.
So I created <a href="https://github.com/donnierayjones/pandordio-node">a proxy in Node.js</a>. This &ldquo;proxy&rdquo; does a little
more than merely proxy requests to the Rdio API, though.</p>

<p>I have it hosted <a href="https://pandordio.herokuapp.com/">on Heroku</a>, where it&rsquo;s also serving as the
public landing page for PandoRdio. You authorize PandoRdio&rsquo;s
access to your Rdio account through here, and a cookie is set to
handle the OAuth requests to the Rdio API.</p>

<h3>Rdio JavaScript Library</h3>

<p>Now that I had a working proxy up, I just needed a small
JavaScript library that used it and provided the handful of API
methods I needed to use. It&rsquo;s available <a href="https://github.com/donnierayjones/rdio-api">on GitHub</a> and
provides the following API methods:</p>

<ul>
<li>search</li>
<li>addToCollection</li>
<li>setAvailableOffline</li>
<li>getPlaylists</li>
<li>createPlaylist</li>
<li>addToPlaylist</li>
</ul>


<h3>All Together Now</h3>

<p>Here&rsquo;s all the apps involved:</p>

<ul>
<li><a href="https://github.com/donnierayjones/pandordio-node">pandordio-node</a> &ndash; the Node.js proxy</li>
<li><a href="https://github.com/donnierayjones/PandoRdio">PandoRdio</a> &ndash; a project containing Rake tasks to build the
rdio-api and copy it into pandordio-chrome

<ul>
<li><a href="https://github.com/donnierayjones/pandordio-chrome">pandordio-chrome</a> &ndash; the Google Chrome Extension</li>
<li><a href="https://github.com/donnierayjones/rdio-api">rdio-api</a> &ndash; the Rdio JavaScript Library</li>
</ul>
</li>
</ul>


<h3>Credits</h3>

<p>Almost all of the Node.js code is based off <a href="https://github.com/monsur/rdio-node">monsur&rsquo;s rdio-node</a>.</p>

<h2>The Google Chrome Extension</h2>

<p>So, now I had all the ingredients necessary to write the
extension that would add a song to my Rdio collection when I
&ldquo;thumbs up&#8221;ed a song in Pandora. The result is the
<a href="https://chrome.google.com/webstore/detail/pandordio/fiobjnnhnijfdkgdmedcbennfngfnfff">PandoRdio extension available in the Google Chrome Webstore</a>.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Flickr Original Images Atom Feed]]></title>
    <link href="https://blog.donnierayjones.com/2012/09/flickr-original-images-atom-feed/"/>
    <updated>2012-09-18T04:56:00-05:00</updated>
    <id>https://blog.donnierayjones.com/2012/09/flickr-original-images-atom-feed</id>
    <content type="html"><![CDATA[<h2>The Problem</h2>

<p>I want my desktop wallpaper to rotate through <a href="http://flickr.com/photos/donnieray/favorites">my Flickr Favorites</a>.
I need the original (or large-sized) images, and I want the images to
automatically download to my Dropbox.</p>

<!--more-->


<h2>The Solution</h2>

<pre><code>Node.js + IFTTT
</code></pre>

<p>Flickr&rsquo;s RSS and Atom feeds don&rsquo;t offer the original image size in the
feeds. I wrote <a href="https://github.com/donnierayjones/flickr-originals">a Node.js app</a> that uses the Flickr API to expose an
Atom feed with larger image sizes.</p>

<p><a href="https://ifttt.com">IFTTT</a> has a channel for RSS/Atom feeds and a channel for Dropbox.
<a href="https://ifttt.com/recipes/57448">This is the recipe</a> I needed:</p>

<p><img src="http://f.cl.ly/items/2I210l2P1s0V2i3o0t2V/ifttt.png" alt="ifttt recipe" /></p>

<p>IFTTT downloads the images (within 15 minutes after favoriting) to my
Dropbox:</p>

<p><img src="http://f.cl.ly/items/1c27111Q1J0z3y0s3A2B/finder.png" alt="finder" /></p>

<h2>Usage</h2>

<p>I&rsquo;m sharing this in case anyone else wants a free solution. To use it,
just use <a href="https://ifttt.com/recipes/57448">this IFTTT recipe</a>. You&rsquo;ll have to edit the feed url.
Change the id portion to your Flickr Id. You can find your Flickr Id
using <a href="http://idgettr.com">idGettr</a>.</p>

<p>For example, my Flickr Id is <code>11946169@N00</code>, so the url I use is
<code>http://flickr.donnierayjones.com/favorites/11946169@N00.atom</code></p>

<p>I also expose the originals of your own uploaded images. The feed URL
for this (assuming Flickr Id <code>11946169@N00</code>) is
<code>http://flickr.donnierayjones.com/photos/11946169@N00.atom</code>.</p>

<h2>The Open Web</h2>

<p>This is what I love about the Web. I don&rsquo;t have to pay for an app in an
App Store. I can just fork a couple of repositories on Github, write a
quick Node.js app, and deploy to Heroku for free.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Coderbility: Syntax Highlighting for Readability (and Instapaper)]]></title>
    <link href="https://blog.donnierayjones.com/2012/09/coderbility-syntax-highlighting-for-readability/"/>
    <updated>2012-09-06T06:45:00-05:00</updated>
    <id>https://blog.donnierayjones.com/2012/09/coderbility-syntax-highlighting-for-readability</id>
    <content type="html"><![CDATA[<p>I&rsquo;ve created <a href="https://chrome.google.com/webstore/detail/jhgglggpkgacolaedjhokfniopcinphf">Coderbility</a>, a simple Google Chrome extension that
adds syntax highlighting to <a href="http://www.readability.com">Readability</a> and <a href="http://www.instapaper.com">Instapaper</a>. It
relies on <a href="http://softwaremaniacs.org/soft/highlight/en/">highlightjs</a> and is actually very little JavaScript &amp;
CSS.</p>

<!--more-->


<p>Here&rsquo;s a screenshot:</p>

<p><img src="http://f.cl.ly/items/0e3i2R0m352l2e2R430W/instapaper-screen.png" alt="screenshot" /></p>

<p>I use Readability as my &ldquo;read it later&rdquo; service, and I use Instapaper&rsquo;s
<a href="http://www.instapaper.com/extras">Text Bookmarklet</a> if I just want to read an article <em>now</em>. If you use
Readability&rsquo;s <strong>Read Now</strong> bookmarklet, it adds it to your Reading List,
which isn&rsquo;t what I usually want.</p>

<p>I also rely on <a href="http://lifehacker.com/5476033/how-to-set-keyword-bookmarks-in-google-chrome">Google Chrome&rsquo;s search engines to activate my
bookmarklets</a>. If I can use a bookmarklet rather than a Chrome
Extension, I will.</p>

<h2>The Code</h2>

<p>I said that this extension is very little code, and it is. Here&rsquo;s the
JavaScript:</p>

<pre><code>$('pre:not(:has(code)), pre code').each(function(i, e) {
  hljs.highlightBlock(e);
});
</code></pre>

<p>And the CSS:</p>

<pre><code>pre, code {
  background: transparent !important;
}
</code></pre>

<p>I was originally just using <a href="https://github.com/defunkt/dotjs">dotjs</a> and <a href="https://github.com/stewart/dotcss">dotcss</a> to do this, but
it&rsquo;s not as easy to share across platforms (I&rsquo;m on a Mac and on
Windows).</p>

<h2>Installation</h2>

<p>You can download Coderbility from <a href="https://chrome.google.com/webstore/detail/jhgglggpkgacolaedjhokfniopcinphf">the Chrome Web Store</a> or
you can <a href="https://github.com/donnierayjones/coderbility">fork it on Github</a>.</p>

<h2>Issues</h2>

<p>I&rsquo;ve noticed that it doesn&rsquo;t work well with some code snippets, and I
haven&rsquo;t bothered to find out why. I&rsquo;ll try to look into these as I
have time.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Responsive Twitter: A Google Chrome Extension]]></title>
    <link href="https://blog.donnierayjones.com/2012/04/responsive-twitter-a-google-chrome-extension/"/>
    <updated>2012-04-01T19:01:00-05:00</updated>
    <id>https://blog.donnierayjones.com/2012/04/responsive-twitter-a-google-chrome-extension</id>
    <content type="html"><![CDATA[<p>I wrote a Google Chrome Extension that makes twitter.com more
responsive.</p>

<!--more-->


<p><img src="http://f.cl.ly/items/461A2S0u1L0O0b1T022a/chrome-screen-large.png" alt="screenshot" /></p>

<h2>Twitter for Mac Drawbacks</h2>

<p>I never liked <a href="http://itunes.apple.com/us/app/twitter/id409789998">Twitter for Mac</a>. I tend to stay in the browser &ndash; it&rsquo;s safe there. I like <a href="http://sparrowapp.com/mac.php">Sparrow</a>, but I still use gmail.com. I like <a href="http://reederapp.com/mac/">Reeder</a>, but I keep going back to Google Reader and <a href="http://www.readability.com/">readability.com</a>. In fact, I think the only app I stick with that&rsquo;s not running in the browser is the one I&rsquo;m writing this post in: <a href="http://www.iterm2.com/">iTerm2</a>.</p>

<p>That&rsquo;s all I need: a browser and a command line.</p>

<p>However, there were some things I liked about Twitter for Mac, my favorite of which was the simplicity. I don&rsquo;t need all the extra stuff Twitter&rsquo;s pushing, I just want my timeline and to occasionally send a tweet.</p>

<h3>Keyboard Shortcuts</h3>

<p>Twitter for Mac does have some of the shortcut keys that are available on the website, but it doesn&rsquo;t have the <code>enter</code> key for expanding a tweet.  The <code>enter</code> key on Twitter for Mac does various things depending on what you&rsquo;re focused on. I like the twitter.com web app&rsquo;s behavior better.</p>

<h3>Optimize My Screen Real Estate</h3>

<p>I also didn&rsquo;t like how Twitter for Mac keeps a sidebar on the left.  Sure, it&rsquo;s pretty small, but it&rsquo;s several pixels being used that I don&rsquo;t need. You <em>can</em> open the timeline without the sidebar (Window > Open in New Window) but there&rsquo;s no way to make it the default view.</p>

<h3>It&rsquo;s not on Windows</h3>

<p>The biggest problem with Twitter for Mac is that it is for Mac (only). I use Windows for 8 hours a day at work.</p>

<h2>Responsive Twitter</h2>

<p>I had been running some simple stylesheet hacks via the <a href="https://chrome.google.com/webstore/detail/fjnbnpbmkenffdnngjfgmeleoegfcffe">Stylish</a> extension on Google Chrome. With these I was able to fix the only issue I had with twitter.com: the layout. I wrote up a few media queries in a stylesheet that let me resize the window down. I was running this for several months but it had some drawbacks:</p>

<ul>
<li>No syncing of stylish options across Google Chrome. I.e. I would add a style at home but would have to add it on my work machine too.</li>
<li>No easy way to launch twitter.com in a narrow window.</li>
<li>No easy way to share styles.</li>
</ul>


<h3>The Google Chrome Extension</h3>

<p>So, I wrote a simple Google Chrome Extension. <a href="https://chrome.google.com/webstore/detail/mlfldkpapihighaigbbaaicpjoddlhhf">Responsive Twitter</a> adds the same media queries I was using with Stylish, plus some.  Since it&rsquo;s an extension, I can also run JavaScript. And I can hook into some of the features specific to Google Chrome. Here&rsquo;s a few things I could add by using a Chrome Extension:</p>

<ul>
<li>Disable jQuery animations</li>
<li>Open links in the timeline in the background</li>
<li>Launch twitter in a separate, chrome-less window</li>
<li>Easy sharing with others</li>
<li>Sync between all of my computers (via Google Chrome Sync)</li>
</ul>


<h3>Quick Notes on Developing a Chrome Extension</h3>

<p>I learned a bit about how Chrome Extensions work while writing this extension. One thing that&rsquo;s a little hard to grasp is how content scripts and background scripts can communicate with each other and how much control (or lack thereof) you have over the page that&rsquo;s loaded.</p>

<p>The hardest feature to add was disabling jQuery animations. Well, actually, when you learn how it&rsquo;s really easy.</p>

<p>With a Google Chrome Extension, you can&rsquo;t get direct access to the page&rsquo;s scripts or variables. You basically get access to the DOM, and that&rsquo;s it. So to disable jQuery animations you can&rsquo;t just run the following in a content script:</p>

<pre><code>$.fx.off = true;
</code></pre>

<p><code>$</code>, or <code>jQuery</code>, is defined on twitter.com and you can&rsquo;t get access to it. However, we can execute JavaScript by setting the browser location in our content script!</p>

<pre><code>document.location = 'javascript:$.fx.off=true;';
</code></pre>

<p>Well, that <em>was</em> easy!</p>

<h3>Future Developments</h3>

<p>I hope to do some more work on the extension in the future:</p>

<ul>
<li>Open links in the timeline with keyboard shortcut <code>o</code> &ndash; <strong>update</strong> 2012-04-05: done!</li>
<li>Better implementation of screen position/size storage &ndash; <strong>update</strong> 2012-04-15: done!</li>
<li>Better implementation of opening links in the background &ndash; <strong>update</strong> 2012-05-02: done!</li>
</ul>


<h2>Make Twitter Responsive</h2>

<p>You can install my <a href="https://chrome.google.com/webstore/detail/mlfldkpapihighaigbbaaicpjoddlhhf">Responsive Twitter Chrome Extension</a>, or fork/clone the repository on <a href="https://github.com/donnierayjones/responsive-twitter">GitHub</a>.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[The Kindle: Physical vs. Digital]]></title>
    <link href="https://blog.donnierayjones.com/2012/02/the-kindle-physical-vs-digital/"/>
    <updated>2012-02-12T10:08:00-06:00</updated>
    <id>https://blog.donnierayjones.com/2012/02/the-kindle-physical-vs-digital</id>
    <content type="html"><![CDATA[<blockquote><p>I read so much more on my Kindle!</p></blockquote>

<p><strong>Liars</strong> &ndash; that&rsquo;s what I thought. Either they were lying, or were tricked into thinking they&rsquo;ve read more. Well, I&rsquo;ve had mine for just about a month now, and I feel the same way. So either I&rsquo;m lying, have been tricked, or I really am reading more now that I have a Kindle.</p>

<!--more-->


<h2>Hesitation</h2>

<p>I was hesitant to get a Kindle for two main reasons:</p>

<ol>
<li><p>I like physical books. I like quickly scanning how many pages a chapter will be. I like the immediate feedback of how much I&rsquo;ve read, and how much more I have to read. And yea, I like the smell of a new book.</p></li>
<li><p>There was no way I could read a software book on the Kindle. There&rsquo;s too many diagrams, charts, code examples, etc. to read on a tiny six inch screen.</p></li>
</ol>


<h2>Fiction and the Lending Library</h2>

<p>So, why did I get a Kindle?</p>

<p>My wife got me addicted to <a href="http://en.wikipedia.org/wiki/The_Hunger_Games">The Hunger Games</a> series, and it got to where we were both reading the last book in the series, <a href="http://www.amazon.com/dp/0439023513">Mockingjay</a>.</p>

<p>We usually read at the same time &ndash; just before going to sleep. So I thought about buying an additional copy, but then I noticed this thing on Amazon called the Kindle Owners Lending Library. It&rsquo;s only available for Kindle <strong>owners</strong>. I.e. you can&rsquo;t get books on your Kindle for iPhone or Kindle for Mac.</p>

<p><em>Mockingjay</em> was available for free in the Lending Library. I had some Amazon gift cards, so without much thinking, I decided I needed a Kindle.</p>

<p>So I bought one. And I finished <em>Mockingjay</em> the same day I got the Kindle.</p>

<h2>I Read More Now</h2>

<p>The Hunger Games books are good. <a href="http://www.youtube.com/watch?v=4S9a5V9ODuY">So good they&rsquo;re making a movie out of&#8217;em</a>. So maybe that&rsquo;s why I read the last one so quickly onthe Kindle. It&rsquo;s not that the Kindle is magical or anything, right?</p>

<p>But then I noticed something else. I discovered that you can send blog posts to your Kindle.</p>

<h2>My Old Workflow</h2>

<p>Before I had a Kindle, I had three methods for keeping up with posts I wanted to read later.</p>

<ol>
<li>Google Reader &ndash; I used the <em>star</em> feature to keep up with blog posts that I wanted to read later.</li>
<li>Twitter &ndash; I would <em>favorite</em> a tweet that linked to a post that I might want to read later.</li>
<li>Chrome Bookmarks &ndash; Any other posts I came across on the internet I would bookmark to Google Chrome&rsquo;s Bookmark Bar.</li>
</ol>


<p>So, I&rsquo;d have three different places to check when I had time to do some reading.</p>

<h2>My New Workflow &ndash; Readability</h2>

<p>Now it&rsquo;s much easier.</p>

<p><a href="http://www.readability.com/">Readability</a> is practically integrated into every piece of software. Now whether I&rsquo;m in Google Reader, Twitter, Tweetbot (iPhone), or Google Chrome, I can send the blog to my reading list on Readability.</p>

<p>And with Readability, I can send longer posts to my Kindle very easily.  Now, every night just before I go to sleep, I can pick up my Kindle and read a post or two. It&rsquo;s awesome.</p>

<h2>Physical to Digital</h2>

<p>So, the Kindle&rsquo;s great for fiction and can be great for long blog posts.  But what about those software books that include diagrams, charts, and code examples?</p>

<p>I purchased <a href="http://www.amazon.com/dp/0132350882">Clean Code</a> for my Kindle and I&rsquo;m about half way through with it right now. However, I&rsquo;ve been reading it mostly on Kindle for Mac. Of the 11 chapters I&rsquo;ve read, I&rsquo;ve read only about 2 or 3 on my Kindle. I was always opposed to reading on my MacBook, but that was when I would try to read books in .pdf format. The .mobi format works extremely well:</p>

<p><img src="http://static.donnierayjones.com/blog/kindle-for-mac.png"></p>

<h3>Where Digital Wins</h3>

<ol>
<li><p>The Dictionary. Double click (or touch) a word in any book and you get a quick definition of the word. Also, Wikipedia is nicely integrated:
<img src="http://static.donnierayjones.com/blog/wikipedia-lookup.png"></p></li>
<li><p>Highlights &amp; Notes. I was always hesitant to write or mark in any book that I&rsquo;ve purchased. It hurts its resale value and highlights are only temporarily valuable (at least to me). Once I&rsquo;ve grokked something I&rsquo;ve highlighted, I&rsquo;d like to be able to remove that highlight and continue on to others. With the Kindle, I can do that.</p></li>
<li><p>Universal Access. I can access my books on:</p>

<ul>
<li>My Kindle</li>
<li>My MacBook Air</li>
<li>My PC at Work</li>
<li>My iPhone</li>
</ul>
</li>
</ol>


<h2>Pricing</h2>

<p>The major drawback to Kindle books is that they have a <strong>$0 resale value</strong>.</p>

<p>However, I&rsquo;ve found Kindle books to be (for the most part) <strong>dramatically cheaper than their physical counterparts</strong>. I can get two Kindle books for the price of one hardback. I think this makes up for the lack of a resale value.</p>

<h2>Conclusion</h2>

<p>I&rsquo;m still uncertain of how I will like the Kindle (and the idea of digital books in general). I&rsquo;ll have to try a few more books before I&rsquo;m certain that I now prefer digital over physical.</p>

<p>I think there&rsquo;s still a place for hardback books in my library.  Reference and catalog books, like GoF&rsquo;s <a href="http://www.amazon.com/dp/0201633612">Design Patterns</a> and Fowler&rsquo;s <a href="http://www.amazon.com/dp/0321127420">PoEAA</a> are still valuable to have in an easy / quick reach. However, there&rsquo;s also a lot to be said about a digital book that is searchable.</p>

<p>So for now I&rsquo;m defaulting to Kindle editions. I&rsquo;m selling all of my paperbacks and getting Kindle versions. Hopefully I won&rsquo;t regret it.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Budgeting With Google Docs]]></title>
    <link href="https://blog.donnierayjones.com/2011/03/budgeting-with-google-docs/"/>
    <updated>2011-03-06T21:08:52-06:00</updated>
    <id>https://blog.donnierayjones.com/2011/03/budgeting-with-google-docs</id>
    <content type="html"><![CDATA[<h3><strong>Budgeting is Hard</strong></h3>

<p>While in college I used Mint to manage my finances and budget. Budgeting for myself was hard; budgeting for two people is (exponentially?) harder.</p>

<!--more-->


<p>After marrying, my wife and I continued to use Mint. After several months <del>we</del> she decided to try <a href="http://www.daveramsey.com/article/dave-ramseys-envelope-system/lifeandmoney_budgeting/">Dave Ramsey&rsquo;s &ldquo;cash only envelope system&rdquo;</a>. After the first paycheck of using cash we were amazed at how well we managed our money.</p>

<h3><strong>Cash is Physical</strong></h3>

<p>When you&rsquo;re handing over several $20 bills rather than swiping a card, well, your handing over <strong><em>several</em></strong> $20 bills. It makes each transaction a little harder on you. It&rsquo;s a mental transaction, as well as a physical one. It makes you ask, &ldquo;do I really need this?&rdquo;, or, even better, &ldquo;do I <em>have</em> enough cash for this?&rdquo;</p>

<p>I think using cash is similar to the way that writing something by hand (rather than merely reading or typing) helps you to understand and remember something. Using cash takes a little longer and it is more of a physical exchange &ndash; you hand over cash and you get an item. When using a debit card, you keep your card (hopefully), and perhaps imagine that number in your bank account shrinking.</p>

<h3><strong>Cash Puts You in Control</strong></h3>

<p>Using cash also means you have to budget your money ahead of time. When we were using Mint, we had budgets created and it was nice that Mint automatically categorizes transactions for you. However throughout the period between paychecks we would always go over in one area and under in one area. Using the cash method, we budget for each category and each category gets an envelope for cash. When the envelope is empty, that means we&rsquo;ll have to wait until next paycheck to buy something in that category. Mint does provide &ldquo;real time&rdquo; budget amounts, but sometimes debits don&rsquo;t post on the same day or don&rsquo;t show the correct amount until posted. And it&rsquo;s just not as obvious as an empty envelope.</p>

<h3><strong>Exceptions</strong></h3>

<p>It&rsquo;s worth noting that we don&rsquo;t actually use cash for <em>everything</em>. We use debit/credit where we find it to be an inconvenience to use cash, or where we don&rsquo;t typically spend beyond our means. For example, I pay all of our bills online with a credit card (easy rewards points) and then immediately pay it off with a transfer from our checking account. We pay for gas with debit/credit for the convenience. All of these expenses tend to be fixed every month or at least somewhat predictable.</p>

<h3><strong>Mint&rsquo;s Replacement</strong></h3>

<p>I use Google&rsquo;s online applications for several things. I&rsquo;ve <a href="http://blog.donnierayjones.net/2009/10/using-google-calendar-and-gmail-to-pay-your-bills/">already written how I use Google Calendar for bill reminders</a>. I use Gmail (who doesn&rsquo;t?) and I use Google Reader to keep up with my favorite blogs. I use Google Tasks for things like grocery lists and books to read. Google Chrome is essentially my OS and I always have Gmail, Reader, and Calendar as pinned tabs.</p>

<p>I was a fan of Mint, and I used it a couple of months after switching to cash, but it just seemed like the wrong tool for the job. I had used Google Docs Spreadsheets for us to keep up with other financial information (medical school loans are complicated.) So I put together a spreadsheet to manage our budget based on a bi-weekly pay period. Here&rsquo;s the result after months of manipulation and improvement (note: amounts may be edited for obvious reasons).</p>

<p><img src="http://f.cl.ly/items/192Z3j472f2A2y263b1b/Screen-shot-2011-03-06-at-6.57.24-PM.png" alt="" /></p>

<p>With this spreadsheet, we can easily budget months in advance just by scrolling to the right and budgeting for the desired pay period.</p>

<p>Along the very top is the (bi-weekly) date of the paycheck. Under each date are three columns. The first column are money values for various things, some are static (e.g. Income) and some are dynamically calculated (e.g. Total Expenses, Remaining).</p>

<h3><strong>Calculations</strong></h3>

<p>Most of the spreadsheet uses basic calculations. The <strong>Total Expenses</strong> row is pretty obvious, just sum everything below it.</p>

<p><img src="http://static.donnierayjones.com/blog/Screen-shot-2011-03-06-at-6.58.32-PM.png" alt="" /></p>

<p>Similarly, the <strong>Remaining</strong> row is just the difference between the <strong>Income</strong> and the <strong>Total Expenses</strong>.</p>

<p><img src="http://static.donnierayjones.com/blog/Screen-shot-2011-03-06-at-6.58.41-PM.png" alt="" /></p>

<p>Something I got tired of quickly was determining what expenses we needed to withdraw cash for. Typically we&rsquo;ll withdraw however much cash we need (based on the budget) on payday. I began developing an app in Ruby on Rails (I don&rsquo;t know that I really needed an app or was just wanting to learn something new), but I finally realized I was just trying to build an application that a spreadsheet should be able to solve. All I needed was something that could calculate a sum based on a conditional value (the condition here was whether or not the expense needed a cash withdrawal).</p>

<p>I quickly found out that there&rsquo;s a SUMIF() function baked into Google Docs:</p>

<p><img src="http://static.donnierayjones.com/blog/Screen-shot-2011-03-06-at-6.58.05-PM1.png" alt="" /></p>

<p>So that&rsquo;s when I created an additional column for each pay period to denote whether or not we needed cash for the expense. I use an appropriate cash symbol ($) to distinguish those expenses that are cash items. Using the SUMIF() function I can get the total amount I need to withdraw when I go to the bank on payday. One more thing automated!</p>

<p><img src="http://f.cl.ly/items/3H2r0J0p241w383O3e3Z/cash.png" alt="" /></p>

<h3><strong>Handling Various Bill Cycles</strong></h3>

<p>My wife&rsquo;s in medical school and so we have a good dose of loans every year. What we do is place these loans into a checking account and then equally divide the total across a 12 month period to cover costs. The amount we use each month typically covers almost all of our recurring bills. You may have noticed we don&rsquo;t have any specific bills (e.g. electric, AT&amp;T, etc) in the budget above. That&rsquo;s because we don&rsquo;t typically use my paycheck to pay bills; we usually use loan money to cover those. However, sometimes the loan money is not enough to cover all the costs of the bills, so we do have a generic &ldquo;Bills&rdquo; expense that we use to cover these overages.</p>

<p>I created a separate spreadsheet for monthly bills. They group well together with the loan money because the bills occur once a month, and we use an allotment of our loan money once a month. I thought about trying to integrate everything into one budget spreadsheet, but because our incomes vary by date <em>and</em> occurrence (i.e. I&rsquo;m paid every two weeks and use our loan money on the 10th of every month) I felt it was best to keep them separate for the sake of simplicity. Here&rsquo;s our bills spreadsheet:</p>

<p><img src="http://static.donnierayjones.com/blog/Screen-shot-2011-03-06-at-7.01.27-PM.png" alt="" /></p>

<p>This spreadsheet is very much similar to our budget spreadsheet, only much simpler. Because all are non-cash expenses (we pay them all with a credit card to earn rewards points, and then pay off the amount immediately from our checking), we have no need to distinguish between cash and non-cash items. Any time the <strong>Remaining</strong> amount becomes negative, that means our budget (from my paycheck) needs to compensate the difference. This spreadsheet has an added bonus of us being able to keep track of any abnormal billing changes.</p>

<h3><strong>Manage your money &ndash; don&rsquo;t let it manage you</strong></h3>

<p>Some may argue that Mint is better because it will automatically categorize your money and provide amazing charting tools to analyze spending trends. You can save a lot of time by using Mint. I can&rsquo;t argue that Mint doesn&rsquo;t have some neat tools and charting, but I don&rsquo;t think that it helps with budgeting. The fact that we have to manually budget and keep track of expenses with a spreadsheet helps us better understand how we&rsquo;re spending our money.</p>

<p>We tell our money what it can do, not the other way around.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[My Favorite Chrome Extensions]]></title>
    <link href="https://blog.donnierayjones.com/2011/02/my-favorite-chrome-extensions/"/>
    <updated>2011-02-01T21:28:18-06:00</updated>
    <id>https://blog.donnierayjones.com/2011/02/my-favorite-chrome-extensions</id>
    <content type="html"><![CDATA[<p>I recently switched to Google Chrome (from Mozilla Firefox) as my primary browser. I still use Firefox when I need to do heavy-lifting web development. Firebug and other addons are simply not (and may never be) available for Chrome.</p>

<!--more-->


<p>Here&rsquo;s all the extensions I&rsquo;m using. <strong>Note: </strong>I&rsquo;m not using any web development related extension for Chrome; there are good ones out there, but as I mentioned, I use Firefox when debugging web apps.</p>

<ul>
<li><a href="https://chrome.google.com/webstore/detail/gighmmpiobklfepjocnamgkkbiglidom">AdBlock</a>
It seems like I&rsquo;ve used this extension ever since I started using Firefox. For those who don&rsquo;t know, it&rsquo;ll block all those annoying ads littered across the internets.</li>
<li><a href="https://chrome.google.com/webstore/detail/mgdnblnolcinnndenjnollpiplgkbjcn">Better Gmail</a>
While this extension does a lot, I only use a subset of its features:

<ul>
<li>Hide ads (AdBlock hides these ads, but Better Gmail will hide the entire ad column, which allows for more space for your actual email)</li>
<li>Hide invite friends field (who actually invites folks nowadays?)</li>
<li>Hide web search button (I already have 10 other ways to search google)</li>
<li>Add attachment icons (gives a hint as to the attachment file type)</li>
</ul>
</li>
<li><a href="http://labs.embed.ly/">Embedly</a>
This extension is just amazing. It makes the #NewTwitter even Newer. It ads information to the side panel for almost all types of content. Twitter will automatically do Twitpic, YouTube, etc, but this extensions gets everything. It&rsquo;s the reason I&rsquo;m now using twitter.com rather than the Twitter app for Mac.</li>
<li><a href="https://chrome.google.com/webstore/detail/elioihkkcdgakfbahdoddophfngopipi">Facebook Photo Zoom</a>
Zooms Facebook photos as you hover over them. Saves a lot of time!</li>
<li><a href="https://chrome.google.com/webstore/detail/fhaledancjhefginmkkondfjpnkhdglh">Fittr Flickr</a>
This extension does a lot, but what I use most are the shortcut links for different image sizes, shortened flic.kr links, and quick viewing of image metadata.</li>
<li><a href="https://chrome.google.com/webstore/detail/ppelffpjgkifjfgnbaaldcehkpajlmbc">iReader</a>
Sometimes removing ads on a page still doesn&rsquo;t remove all the noise to make an article readable. That&rsquo;s what iReader is for.</li>
<li><a href="https://chrome.google.com/webstore/detail/nlbjncdgjeocebhnmkbbbdekmmmcbfjd">RSS Subscription Extension</a>
RSS subscription isn&rsquo;t baked into Google Chrome, so this extension is a must-have.</li>
<li><a href="https://chrome.google.com/webstore/detail/cpecbmjeidppdiampimghndkikcmoadk">Type-ahead-find</a>
A feature built into Firefox (known as Quick Find) is not available in Google Chrome, but Type-ahead-find is Chrome&rsquo;s Quick Find equivalent. Without this extension, I would have not been able to switch to Chrome from Firefox.</li>
</ul>

]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[My Favorite Mac Apps]]></title>
    <link href="https://blog.donnierayjones.com/2011/01/my-favorite-mac-apps/"/>
    <updated>2011-01-18T22:56:23-06:00</updated>
    <id>https://blog.donnierayjones.com/2011/01/my-favorite-mac-apps</id>
    <content type="html"><![CDATA[<p>I&rsquo;m planning on doing a series of posts of my favorite things:</p>

<ul>
<li>Mac Apps</li>
<li><a href="http://blog.donnierayjones.net/2011/02/my-favorite-chrome-extensions/">Chrome Extensions</a></li>
<li>Firefox Addons</li>
<li>Windows Apps</li>
<li>iPhone Apps</li>
</ul>


<!--more-->


<p>These posts will mostly be a reminder to myself; I don&rsquo;t want to forget about my favorite apps. Instead of static posts, I intend to keep them up-to-date. They will help me remember what I need to install when setting up a new system. Though, I can see this not being a problem in the near future (or present day) with everything &ldquo;auto-remembered&rdquo; for me: iPhone App Store, Mac App Store, Chrome Sync, Firefox Sync, etc.</p>

<p>Anyways, here are my Mac must-have apps:</p>

<ul>
<li><a href="http://www.alfredapp.com/">Alfred</a> &ndash; Application Launcher
First App I found in the Mac App Store. I had been doing the Quicksilver / Quick Search Box thing, but I liked Alfred&rsquo;s UI better. And it seemed quicker. I mostly use it for launching apps, though (like its competitors) it does more than just that.</li>
<li><a href="https://www.dropbox.com/">Dropbox</a> &ndash; File Syncer
Dropbox is pretty much a necessity now-a-days when needing to get files synced across computers. I find the 2GB (plus the extra space they give away time-to-time) plenty of room for what I need.</li>
<li><a href="http://www.mozilla.com/en-US/firefox/">Firefox</a> &ndash; Browser
While I lean heavily on Google Chrome now for my daily browsing, some of the web development addons that aren&rsquo;t available in Chrome are enough to keep Firefox on my Mac.</li>
<li><a href="http://www.flickr.com/tools/uploadr/">Flickr Uploadr</a> &ndash; &hellip; Flicker Uploader?
I <a href="http://flickr.com/photos/donnieray">use Flickr</a> to host my never ending photostream of my kids (or dogs). Flickr Uploadr is the only tool I&rsquo;ve ever used to upload I think. It&rsquo;s not been updated much (that I&rsquo;ve ever noticed) but I don&rsquo;t think it needs to be. It easy, fast, and works.</li>
<li><a href="http://www.google.com/chrome">Google Chrome</a> &ndash; Browser
For the last several months Chrome has become my primary browser. My main reasons for switching from Firefox were: faster, quicker, speedier, nimbler, and faster. It also didn&rsquo;t hurt that Google <a href="http://blog.donnierayjones.net/2010/12/cr-48-chrome-notebook-first-thoughts/">gave me a laptop</a> to test their OS written on top of it.</li>
<li><a href="http://grabbox.devsoft.no/">GrabBox</a> &ndash; Screenshot uploader
This little tool is pretty neat. It automatically uploads screenshots you take on your Mac to a public folder on your Dropbox account. Quickly sharing photos has never been easier. I mostly use it for screenshots that I temporarily want to share, because as soon as you delete the photo from your Dropbox folder, the link becomes a 404.</li>
<li><a href="http://willmore.eu/software/isolator/">Isolator</a> &ndash; Productivity enhancer
This guy sits in your menu and let&rsquo;s you switch into productivity / reading mode with a keybinding or by clicking the icon in the menu. I have dual monitors so I tend to get distracted when reading, so that&rsquo;s when I start Isolator. It&rsquo;s quite configurable, too.</li>
<li><a href="http://code.google.com/p/macvim/">MacVim</a> &ndash; Text Editor
I recently decided to <a href="http://blog.donnierayjones.net/2010/12/learning-vim/">give Vim a try</a>, and this is the GUI Vim editor for Mac OS X.</li>
<li><a href="http://www.binarybakery.com/menupop.html">MenuPop</a> &ndash; Quick Apple Menu Opener
Cause sometimes you want to get to the Mac Menu with your keyboard and you don&rsquo;t want to press Ctrl + Fn + F2 to do it.</li>
<li><a href="http://picasa.google.com/mac/">Picasa</a> &ndash; Photo Editor / Manager
I hate iPhoto. Picasa fills the gap. I especially like the &ldquo;I&rsquo;m Feeling Lucky&rdquo; option. Gets my photos fixed 80% of the time. The other 20% I can manually fix with its tuning options. All my Flickr photos go through Picasa.</li>
<li><a href="http://www.pixelmator.com/">Pixelmator</a> &ndash; Photo Editor
Photoshop is $1000, Pixelmator is $30. Because I&rsquo;ve recently decided not to pirate any software what-so-ever, I&rsquo;ve had to ditch Photoshop and pay for my first application. I don&rsquo;t like paying for software, but I don&rsquo;t like Gimp, either.</li>
<li><a href="http://madeatgloria.com/brewery/silvio/reeder">Reeder</a> &ndash; Google Reader App
I&rsquo;ve tried switching to a prettier Google Reader interface before, but never stuck with one until Reeder came along. I&rsquo;ve got in on the iPhone too, but  I don&rsquo;t really do much reading on it anymore. My favorite feature on it is the option to view the post with the &ldquo;readability&rdquo; fix. Keyboard shorcuts are somewhat different than the default Google Reader webapp, which is annoying!</li>
<li><a href="http://www.microsoft.com/mac/remote-desktop-client">Remote Desktop Connection</a> &ndash; RDP Client
At work I&rsquo;m a PC, so this is app is a must.</li>
<li><a href="http://www.irradiatedsoftware.com/sizeup/">Sizeup</a> &ndash; Window Management
I&rsquo;m using this app in &ldquo;demo&rdquo; mode, so that it nags me to purchase it after several uses. I don&rsquo;t like it enough to pay for it, but I like it enough that the nagging doesn&rsquo;t annoy me enough to remove it. The Mac lacks any kind of window management, and this app greatly helps in this area.</li>
<li><a href="http://wakaba.c3.cx/s/apps/unarchiver.html">The Unarchiver</a> &ndash; Compressed File Decompressor
Unzips most file formats, except it seems to have trouble with some encrypted ones (7z, for example).</li>
<li><a href="http://www.transmissionbt.com/">Transmission</a> &ndash; Bittorrent Client
Every now and then (before my switch to <a href="http://twitter.com/#!/donnierayjones/status/381848467283968">legal software</a>/<a href="http://twitter.com/#!/donnierayjones/status/381660503740416">music</a> only it was every day) I need to use bittorrent. I chose Transmission over uTorrent because it was simpler.</li>
<li><a href="http://itunes.apple.com/us/app/twitter/id409789998?mt=12">Twitter</a> &ndash; Twitter Client
I really like the new twitter.com, but this app is too cool, and it doesn&rsquo;t take up much screen space.</li>
</ul>

]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Cr-48 Chrome Notebook - First Thoughts]]></title>
    <link href="https://blog.donnierayjones.com/2010/12/cr-48-chrome-notebook-first-thoughts/"/>
    <updated>2010-12-19T01:01:00-06:00</updated>
    <id>https://blog.donnierayjones.com/2010/12/cr-48-chrome-notebook-first-thoughts</id>
    <content type="html"><![CDATA[<p>When I got home from work Friday I was surprised with Google&rsquo;s Cr-48 Chrome Notebook at my doorstep. I had signed up for the pilot program that Google was offering, but I really didn&rsquo;t expect to be chosen. Needless to say, I was excited.</p>

<!--more-->


<p><a href="http://f.cl.ly/items/2I1N1Y08090B2H3p1t0u/DSC_0621-1024x685.jpg"><img src="http://f.cl.ly/items/2I1N1Y08090B2H3p1t0u/DSC_0621-1024x685.jpg" alt="" /></a></p>

<p>I&rsquo;m interested in Chrome OS because my current netbook, a Dell Mini 9, has Mac OS X Snow Leopard installed, but I really only use Google Chrome on it. On a notebook, that&rsquo;s really all I need these days.</p>

<p>Soon I&rsquo;ll write an in-depth review, but for now I&rsquo;m sharing my initial thoughts on the software and hardware that Google gave me.</p>

<h2>Hardware</h2>

<p>The laptop seems to be pretty well built and sort of resembles a Apple laptop. It&rsquo;s extremely minimal and the keyboard is very nice to use. The screen resolution is 1280x800 and the trackpad is huge.</p>

<p><strong>Pros</strong>:</p>

<ul>
<li>New Tab key instead of Caps Lock</li>
<li>Spacious, browser-oriented keyboard</li>
<li>OS specific keys instead of F1, F2, etc. keys</li>
<li>SD slot included (not yet tested)</li>
</ul>


<p><strong>Cons</strong>:</p>

<ul>
<li>Trackpad is horrible (though this is most likely a software issue?)</li>
<li>Right clicking is awkward (it involves clicking the trackpad, which doubles as a button, with two fingers)</li>
</ul>


<h2>Software</h2>

<p>Well, it&rsquo;s Google Chrome.. and that&rsquo;s pretty much it. But it&rsquo;s awesome that I can log into the machine with my Google user account, and right when the OS starts, I have all of my extensions and bookmarks. All my settings, synced, no setup required. Google&rsquo;s been preparing for that seamless integration for a while, and it shows.</p>

<p><strong>Pros</strong>:</p>

<ul>
<li>It&rsquo;s Google Chrome!</li>
<li>Switching between Chrome &ldquo;windows&rdquo; is very nice and smooth. It&rsquo;s almost like having Spaces.</li>
<li>Like the browser, it can remember the open tabs when you shutdown and will restore them at logon.</li>
<li>Ctrl+Alt+/ shows common keyboard shortcuts. Awesome!</li>
<li>Gmail chats stay &ldquo;always on top&rdquo; at the bottom of the screen.</li>
</ul>


<p><strong>Cons</strong>:</p>

<ul>
<li>The system font is ugly. I&rsquo;m pretty picky when it comes to fonts&hellip; I just wish there were more settings to set the font or at least turn on font smoothing.</li>
<li>Runs a little slow at times, but I&rsquo;m sure that&rsquo;s due to limited hardware.</li>
<li>No support to hide extension icons from the toolbar like you can on the latest version of Chrome for Windows (note: I&rsquo;m not actually sure what version of Chrome enabled this, but I noticed the option recently).</li>
</ul>

]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Learning Vim]]></title>
    <link href="https://blog.donnierayjones.com/2010/12/learning-vim/"/>
    <updated>2010-12-12T18:08:45-06:00</updated>
    <id>https://blog.donnierayjones.com/2010/12/learning-vim</id>
    <content type="html"><![CDATA[<p><a href="http://f.cl.ly/items/052d2F0l0c472Q352j1P/442j.png"><img src="http://f.cl.ly/items/052d2F0l0c472Q352j1P/442j.png" alt="" /></a></p>

<p>I plan on diving into Ruby on my Mac soon and was in need of a good editor. I&rsquo;ve been wanting to use TextMate, but with a $50 price tag (and my recent vow to only use legal software) I was hesitant to go that route. It&rsquo;s not that I don&rsquo;t think it&rsquo;s worth $50, I just have a very hard time spending money on software when there&rsquo;s free alternatives.</p>

<!--more-->


<p>Vim&rsquo;s been mentioned several times by developers across all development platforms as their favorite editor. What I like best about it is that it&rsquo;s free.</p>

<p>So I downloaded MacVim and stumbled upon <a href="http://vim.runpaint.org/">Vim Recipes</a> which I&rsquo;ve been reading through for a couple of hours today.</p>

<p>I&rsquo;m hoping that I&rsquo;ll stick with it and use it. I think I&rsquo;ll like it; I already use most of the Vim-inspired bindings that are available in Gmail, Twitter, Google Reader, so I&rsquo;m already familiar with the basics. What I believe is the biggest problem for me is that Vim bindings are not universally available. Sure, Vim <em>can</em> be installed on any environment. However, it won&rsquo;t be available on a Windows server that I&rsquo;ve RDPed into and only has Notepad installed. I&rsquo;ll have typed 100 jki&rsquo;s in the text file before I realize what I&rsquo;m doing.</p>

<p>My brain and fingers currently have Up, Down, Left, Right, Ctrl, Shift, Cmd, Alt combinations (that are universally available) ingrained for manipulating and selecting text. Vim isn&rsquo;t available in comment boxes in my browser. Microsoft Word doesn&rsquo;t close when I enter :q. I understand there&rsquo;s probably plugins that enable all this, but that&rsquo;s not what I&rsquo;m looking for; that&rsquo;s not universal. I don&rsquo;t want 30 Vim plugins to be installed on every machine I use.</p>

<p>But here goes. In a couple of months I&rsquo;ll either be a jjjk<sup>iHelloWorld</sup> master or I will spend $50.</p>

<p>Does anyone have any suggested resources (other than Vim Recipes) for learning Vim?</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Preventing Duplicate Form Submissions With jQuery]]></title>
    <link href="https://blog.donnierayjones.com/2010/10/preventing-duplicate-form-submissions-with-jquery/"/>
    <updated>2010-10-07T17:06:21-05:00</updated>
    <id>https://blog.donnierayjones.com/2010/10/preventing-duplicate-form-submissions-with-jquery</id>
    <content type="html"><![CDATA[<p>Today I was emailed by a colleague asking how my team prevents duplicate form submissions (double clicking a button, pressing enter twice on text field, etc.) on the web.</p>

<!--more-->


<p>I tried to come up with a robust and simple solution and I wrote the following jQuery snippet in an email response:</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
</pre></td><td class='code'><pre><code class='javascript'><span class='line'><span class="nx">$</span><span class="p">(</span><span class="s1">&#39;form&#39;</span><span class="p">).</span><span class="nx">submit</span><span class="p">(</span><span class="kd">function</span><span class="p">()</span> <span class="p">{</span>
</span><span class='line'>  <span class="nx">$</span><span class="p">(</span><span class="k">this</span><span class="p">).</span><span class="nx">submit</span><span class="p">(</span><span class="kd">function</span><span class="p">()</span> <span class="p">{</span> <span class="k">return</span> <span class="kc">false</span><span class="p">;</span> <span class="p">});</span>
</span><span class='line'><span class="p">});</span>
</span></code></pre></td></tr></table></div></figure>


<p>It seems simple enough to work, and I tested it in Firefox, Chrome, and IE7/8 and it did seem to do the trick.</p>

<p>However, I haven&rsquo;t fully tested it. I expect problems on pages that involve ajax requests and rely on multiple submissions without actually refreshing the form.</p>

<p>But for now, it seems to be working. Anyone have a better solution?</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Custom HandleErrorAttribute in ASP.NET MVC]]></title>
    <link href="https://blog.donnierayjones.com/2010/08/custom-handleerrorattribute-in-asp-net-mvc/"/>
    <updated>2010-08-21T15:30:07-05:00</updated>
    <id>https://blog.donnierayjones.com/2010/08/custom-handleerrorattribute-in-asp-net-mvc</id>
    <content type="html"><![CDATA[<p>I&rsquo;ve been working on upgrading a WebForms application to ASP.NET MVC for several months now at work. I finally took some time to look into custom error pages and ended up needing more support than what came &ldquo;out-of-the-box&rdquo; with ASP.NET MVC 2.</p>

<!--more-->


<p>We have a base controller that all of our app&rsquo;s controllers inherit from. We&rsquo;ve had a [HandleError] attribute on this base controller for a while, but for some reason we never saw our custom error page that was located in ~/Views/Shared/Error.aspx. I thought maybe I wasn&rsquo;t using the attribute correctly, but it turned out that there was an error rendering the Error.aspx View!</p>

<p>Our app relies on a Master Page that itself relies on a ViewDataDictionary that is always populated by our base controller. To sum up the problem, the HandleErrorAttribute creates a new ViewDataDictionary for the Error View, and because our Master Page needed the ViewData created by the base controller, a null reference exception occurred when accessing properties on ViewData[&ldquo;MyKey&rdquo;].</p>

<p>If you run into this problem, you can write a custom HandleErrorAttribute that will fix the problem. I haven&rsquo;t tested this much at all, as I eventually created a custom MasterPageView base that eliminates the dependency on the ViewDataDictionary. But here it is:</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
<span class='line-number'>8</span>
<span class='line-number'>9</span>
<span class='line-number'>10</span>
<span class='line-number'>11</span>
<span class='line-number'>12</span>
<span class='line-number'>13</span>
</pre></td><td class='code'><pre><code class='csharp'><span class='line'><span class="k">public</span> <span class="k">class</span> <span class="nc">HandleErrorWithPersistentViewDataAttribute</span> <span class="p">:</span> <span class="n">HandleErrorAttribute</span> <span class="p">{</span>
</span><span class='line'>  <span class="k">public</span> <span class="k">override</span> <span class="k">void</span> <span class="nf">OnException</span><span class="p">(</span><span class="n">ExceptionContext</span> <span class="n">filterContext</span><span class="p">)</span> <span class="p">{</span>
</span><span class='line'>    <span class="k">base</span><span class="p">.</span><span class="n">OnException</span><span class="p">(</span><span class="n">filterContext</span><span class="p">);</span>
</span><span class='line'>
</span><span class='line'>    <span class="kt">var</span> <span class="n">typedResult</span> <span class="p">=</span> <span class="n">filterContext</span><span class="p">.</span><span class="n">Result</span> <span class="k">as</span> <span class="n">ViewResult</span><span class="p">;</span>
</span><span class='line'>    <span class="k">if</span> <span class="p">(</span><span class="n">typedResult</span> <span class="p">!=</span> <span class="k">null</span><span class="p">)</span> <span class="p">{</span>
</span><span class='line'>      <span class="kt">var</span> <span class="n">tmpModel</span> <span class="p">=</span> <span class="n">typedResult</span><span class="p">.</span><span class="n">ViewData</span><span class="p">.</span><span class="n">Model</span><span class="p">;</span>
</span><span class='line'>      <span class="n">typedResult</span><span class="p">.</span><span class="n">ViewData</span> <span class="p">=</span> <span class="n">filterContext</span><span class="p">.</span><span class="n">Controller</span><span class="p">.</span><span class="n">ViewData</span><span class="p">;</span>
</span><span class='line'>      <span class="n">typedResult</span><span class="p">.</span><span class="n">ViewData</span><span class="p">.</span><span class="n">Model</span> <span class="p">=</span> <span class="n">tmpModel</span><span class="p">;</span>
</span><span class='line'>      <span class="n">filterContext</span><span class="p">.</span><span class="n">Result</span> <span class="p">=</span> <span class="n">typedResult</span><span class="p">;</span>
</span><span class='line'>    <span class="p">}</span>
</span><span class='line'>  <span class="p">}</span>
</span><span class='line'><span class="p">}</span>
</span></code></pre></td></tr></table></div></figure>


<p>It&rsquo;s pretty simple (and probably not thought out well enough), but it worked for me. We do need to keep the Model created by the default HandleErrorAttribute which is an object of type HandleErrorInfo, which can be utilized by your Error View.</p>

<p>Another thing that can be done with a HandleErrorAttribute is error logging. It&rsquo;s pretty simple as well. Just inherit from the HandleErrorAttribute, run the base method, grab an instance of your logger, and log it!</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
<span class='line-number'>8</span>
</pre></td><td class='code'><pre><code class='csharp'><span class='line'><span class="k">public</span> <span class="k">class</span> <span class="nc">HandleErrorAndLogItAttribute</span> <span class="p">:</span> <span class="n">HandleErrorAttribute</span> <span class="p">{</span>
</span><span class='line'>  <span class="k">public</span> <span class="k">override</span> <span class="k">void</span> <span class="nf">OnException</span><span class="p">(</span><span class="n">ExceptionContext</span> <span class="n">filterContext</span><span class="p">)</span> <span class="p">{</span>
</span><span class='line'>    <span class="k">base</span><span class="p">.</span><span class="n">OnException</span><span class="p">(</span><span class="n">filterContext</span><span class="p">);</span>
</span><span class='line'>
</span><span class='line'>    <span class="kt">var</span> <span class="n">controller</span> <span class="p">=</span> <span class="p">(</span><span class="n">BaseController</span><span class="p">)</span><span class="n">filterContext</span><span class="p">.</span><span class="n">Controller</span><span class="p">;</span>
</span><span class='line'>    <span class="n">controller</span><span class="p">.</span><span class="n">Log</span><span class="p">.</span><span class="n">Error</span><span class="p">(</span><span class="n">filterContext</span><span class="p">.</span><span class="n">Exception</span><span class="p">.</span><span class="n">Message</span><span class="p">,</span> <span class="n">filterContext</span><span class="p">.</span><span class="n">Exception</span><span class="p">);</span>
</span><span class='line'>  <span class="p">}</span>
</span><span class='line'><span class="p">}</span>
</span></code></pre></td></tr></table></div></figure>



]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Using a Custom RouteHandler in MVC 2]]></title>
    <link href="https://blog.donnierayjones.com/2010/02/using-a-custom-routehandler-in-mvc-2/"/>
    <updated>2010-02-21T14:54:36-06:00</updated>
    <id>https://blog.donnierayjones.com/2010/02/using-a-custom-routehandler-in-mvc-2</id>
    <content type="html"><![CDATA[<p>So I was trying to use a custom RouteHandler in ASP.NET MVC 2 to allow for hyphens (as opposed to CamelCase or underscores) in my urls.</p>

<!--more-->


<p>I found <a href="http://blog.zero7web.com/2010/02/how-to-allow-hyphens-in-urls-using-asp-net-mvc-2/">this route handler</a> that does the job well, but I wasn&rsquo;t sure how to register the route handler. All the examples online used the Route.Add() method to add routes. However, it seems that it&rsquo;s encouraged to use the MapRoute() method on the Routing collection instead, but the MapRoute() method doesn&rsquo;t have a signature to provide a custom RouteHandler.</p>

<p>It&rsquo;s a similar situation when registering routes in Areas. The RegisterArea() method adds routes using the MapRoute() method on the AreaRegistrationContext object.</p>

<p>It turns out that this MapRoute() method returns the Route object that is created. This object has a public RouteHandler property that can be set. This is how I am registering a custom route handler for my route:</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
</pre></td><td class='code'><pre><code class='csharp'><span class='line'><span class="k">public</span> <span class="k">override</span> <span class="k">void</span> <span class="nf">RegisterArea</span><span class="p">(</span><span class="n">AreaRegistrationContext</span> <span class="n">context</span><span class="p">)</span> <span class="p">{</span>
</span><span class='line'>  <span class="n">context</span><span class="p">.</span><span class="n">MapRoute</span><span class="p">(</span>
</span><span class='line'>      <span class="s">&quot;RouteName&quot;</span><span class="p">,</span>
</span><span class='line'>      <span class="s">&quot;areaName/{controller}/{action}/{id}&quot;</span><span class="p">,</span>
</span><span class='line'>      <span class="k">new</span> <span class="p">{</span> <span class="n">controller</span> <span class="p">=</span> <span class="s">&quot;Home&quot;</span><span class="p">,</span> <span class="n">action</span> <span class="p">=</span> <span class="s">&quot;Index&quot;</span><span class="p">,</span> <span class="n">id</span> <span class="p">=</span> <span class="s">&quot;&quot;</span> <span class="p">}</span>
</span><span class='line'>  <span class="p">).</span><span class="n">RouteHandler</span> <span class="p">=</span> <span class="k">new</span> <span class="n">HyphenatedRouteHandler</span><span class="p">();</span>
</span><span class='line'><span class="p">}</span>
</span></code></pre></td></tr></table></div></figure>


<p>If anyone has a better way of doing this, please let me know.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Hide Gmail Ads in Fluid]]></title>
    <link href="https://blog.donnierayjones.com/2010/01/hide-gmail-ads-in-fluid/"/>
    <updated>2010-01-04T22:18:28-06:00</updated>
    <id>https://blog.donnierayjones.com/2010/01/hide-gmail-ads-in-fluid</id>
    <content type="html"><![CDATA[<p>After several minutes of trying different userscripts to hide Gmail&rsquo;s sponsored links, I discovered that <a href="http://fluidapp.com/">Fluid</a> has built in support for userstyles. Applying a style seemed much easier than a script, because all we really want to do is hide something, which can be done with css.</p>

<!--more-->


<p>To add the userstyle in Fluid, open Preferences for your Gmail Fluid app, and select userstyles. Specify a URL Pattern (I&rsquo;m using http<em>://mail.google.com/</em>) and enter the following css:</p>

<pre><code>table[class='Bs nH iY'] tr td[class='Bu']:last-child {display:none !important;}
</code></pre>

<p>And there ya go, no more sponsored ads.</p>

<p><a href="http://f.cl.ly/items/1L0K3q0z1m2X372l0z03/Screen-shot-2010-01-04-at-10.17.06-PM-300x295.png"><img src="http://f.cl.ly/items/1L0K3q0z1m2X372l0z03/Screen-shot-2010-01-04-at-10.17.06-PM-300x295.png" alt="" /></a></p>

<h3><strong>Update 2010-12-23</strong></h3>

<p>Recently I noticed that Gmail started placing more ads below the message. The following CSS should remove it (include it with the code above to hide all ads):</p>

<pre><code>div.nH.MC { display:none; }
</code></pre>
]]></content>
  </entry>
  
</feed>
