Amazon identifies every product for sale with a ten-digit alphanumeric code called an ASIN (Amazon Standard Identification Number). Whenever you visit a product page on Amazon, these number is somewhere in the URL; however, it's not always in the same place in the URL. This makes it a little bit hard to pull the ASIN out of an arbitrary URL.
Sometimes you need to add some special functions to your Ruby on Rails app, and you want these functions to be available everywhere in your application. In cases like these, you can put your code somewhere in Ruby on Rails's load path, and it will be loaded automatically without you having to "require" it in any of your other files.
Making OpenResty and Passenger work together isn't too hard, but it's not obvious how to do it. There's a lot of guides for getting Passenger to work with Nginx, but the process for OpenResty is a little different. For that reason, I'm documenting how I got them to work together here.