Skip to content

Instantly share code, notes, and snippets.

@choonkeat
choonkeat / README.md
Created May 10, 2014 14:38
ActiveResource access to Shopify Discount API using email+password login

Usage

Provide SHOPIFY_SUBDOMAIN, SHOPIFY_EMAIL and SHOPIFY_PASSWORD environment variables, and discount.rb will configure itself.

Supported APIs are

  • Discount.find(:all)
  • Discount.find(:first)
  • Discount.create(...)
  • Discount#destroy
@moh-alsheikh
moh-alsheikh / Setup Deployment Enviroment Notes
Created October 29, 2012 19:16
Nginx and unicorn # Setup Deployment Enviroment Notes #
:::::::: Nginx and unicorn Deployment Enviroment ::::::::::
Nginx is a pure web server that's intended for serving up static content and/or redirecting the request to another socket to handle the request.
Unicorn is a Rack web server and only intended to host a 'Rack App' which is usually generating dynamic content. Rack apps can also serve up static content but it's less efficient than most other traditional web servers.
Most RoR setups use a combination of both traditional web servers and Rack servers to apply the best of both of their capabilities. Nginx is incredibly fast at request redirection through proxy balancing and serving up static content. Unicorn is quite capable of processing HTTP headers and balancing inbound requests to Ruby for processing.
http://nginx.org/en/docs/