nathan’s blog - kickass stuff from and for the interwebs

Tillamook Cheddar

Pro tip: delicious Tillamook Cheddar now available at Rochester area Wegmans stores, and at a great price too ($7.99/lb)

Loading mentions Retweet
Filed under  //   cheese   food  

Comments [0]

Magic Hat Summer Wacko

It's pink.

Loading mentions Retweet
Filed under  //   beer  

Comments [0]

Ohai There Sexy

Loading mentions Retweet
Filed under  //   games   hardware   Xbox 360  

Comments [0]

Short Amazon Affiliate Links, Round Two

The other day I noticed that Amazon owns the "amzn.com" domain and they use it to generate short links to products. Unfortunately, the only way I've found to directly create the short links is to use a very tiny 'share on Twitter' button on the product page:

This button opens a new browser window and pre-fills the status update field with the short link. But what if you want to paste a short link into an email or Twitter client? Let's solve that problem by creating a JavaScript bookmarklet that returns a shortened URL, and optionally appends your Amazon affiliate code.

I've explored this area before by using Mac OS X's Automator and Ruby. This time, let's create a cross-platform solution.

Stoyan Stefanov created a bookmarklet solution that grabs the ASIN from most Amazon product pages and returns a URL without all the cruft. I like the simplicity of Stoyan's solution, as it uses JavaScript to grab the ASIN by its element ID, instead of using a complicated regex. We'll use his code as a starting point, and tweak it to support the new short domain.

The short link format is simple, it's just "http://amzn.com/" + the ASIN.

If you want to generate URLs with an affiliate ID, use this code:

otherwise use this:

Edit your Affiliate ID (if applicable), then paste the code into the very handy Bookmarklet Crunchinator. Drag the output link to your bookmarks bar, and you're done!

Now, when you visit an Amazon product page, you can click your bookmarklet and a shortened URL is returned. This seems to work on most products, though I've run into a few (like Kindle books) that don't seem to work.

Enjoy!

Loading mentions Retweet
Filed under  //   Amazon   JavaScript   tutorial  

Comments [0]

Panang Curry w/ Chicken

Loading mentions Retweet
Filed under  //   food  

Comments [0]

To Boldly Go

For some reason it didn't click until this morning that my go-to mugs are both Star Trek themed.

Loading mentions Retweet

Comments [0]

Writing Advice for Engineers

How to make engineers write concisely with sentences? By combining journalism with the technical report format. In a newspaper article, the paragraphs are ordered by importance, so that the reader can stop reading the article at whatever point they lose interest, knowing that the part they have read was more important than the part left unread.

State your message in one sentence. That is your title. Write one paragraph justifying the message. That is your abstract. Circle each phrase in the abstract that needs clarification or more context. Write a paragraph or two for each such phrase. That is the body of your report. Identify each sentence in the body that needs clarification and write a paragraph or two in the appendix. Include your contact information for readers who require further detail.

— William A. Wood, September 8, 2005 (source)

Loading mentions Retweet
Filed under  //   writing  

Comments [0]

SLAM-BASA!

The amazing SLAM-BASA sandwich from DJ's European Deli & Market in Dorchester, MA.

Kielbasa, hot peppers, barbecue sauce, garlic ham and polish cheese on a sub roll. *droooooooooool*

Loading mentions Retweet

Comments [0]

Playing Vectrex at Mill-Z's House

Loading mentions Retweet

Comments [0]

nVidia at PAX East

Loading mentions Retweet

Comments [0]