nathan's blog

kickass stuff from and for the interwebs
May 26

Kicking Ass + Taking Names with Sass & Compass

I finally got around to recording, editing, and posting a video version of my April 2011 Barcamp Rochester presentation. Check it out on Vimeo.

Kicking Ass + Taking Names with Sass & Compass from Nathan Henderson on Vimeo.

Jul 13

Tillamook Cheddar

Image

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

Jul 3

Magic Hat Summer Wacko

Image

It's pink.
Jun 29

Ohai There Sexy

Image

May 25

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:

Amazon_twitter_share

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!

May 15

Panang Curry w/ Chicken

Img_0229
Apr 19

To Boldly Go

Img_0224

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

Apr 6

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)

Mar 28

SLAM-BASA!

Img_0050

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*

Mar 27

Playing Vectrex at Mill-Z's House

Img_0049

About Nathan Henderson

I'm a web & app designer, usability nut, gamer, avid cook, and all-around awesome dude in Rochester, NY.
TwitterVimeo

Search Blog

Get Updates

Tags

Archive

2011 (1)
2010 (18)
2009 (32)