Serving Private Content From AWS-CloudFront

Purpose Restrict access to data distributed via Internet, it is important to restrict access to documents, business data, media streams, or content intended for the legitimate users. You can use CloudFront private distributions to restrict access to data in Amazon S3 buckets. How to Restrict access to these private content ? By using signed URL one can restrict access to these private contents. Signing a URL is the process of creating an RSA digital signature using an RSA key and a policy statement. AWS provides a public-key and private-key(called as key-pair) to its users. AWS keeps the public key, and

Amazon CloudFront

What is CloudFront ? CloudFront is a web service that speeds up distribution of your static and dynamic web content, for example, .html, .css, .php, and image files, to end users. CloudFront actually is a CDN [more on CDN][1] How it works ? CloudFront delivers your content through a worldwide network of edge locations. When an end user requests content that you're serving with CloudFront, the user is routed to the edge location that provides the lowest latency, so content is delivered with the best possible performance. If the content is already in that edge location, CloudFront delivers it immediately. If

Mixins in Ruby

MIXIN: Mixin is a class that is mixed with a module. In other words the implementation of the class and module are joined, intertwined, combined, etc. A mixin is a different mechanism to the extend construct used to add concrete implementation to a class. With a mixin you can extend from a module instead of a class. MODULES: Module is a degenerate abstract class. A module can’t be instantiated and no class can directly extend it but a module can fully implement methods. A class can leverage the implementation of a module by including the module’s methods. A

Polymorphic_url

Generate Polymorphic urls from unknown model. [link][1] [1]: http://viget.com/extend/using-polymorphic-url-to-dynamically-generate-urls-from-unknown-models

Simple way to highlight your links based on your current page

Purpose When you traverse between pages of website, you have a link to indicate the current page you are on. So dynamically finding which links is to be set active is done by the below article. Please read the article below for better understanding. There are many primitive ways of doing it but this seems correct as its DRY and KIS. Article Link highlight-link-based-on-current-page-in-rails

BROWSERQUEST

Mozilla Browser quest link

Auto-run background jobs with Procfile and Foreman

Following are the links that explains Procfile and Foreman. [Foreman Manual][1] [Introducing Foreman][2] [Declaring and Scaling Process Types with Procfile][3] [1]: https://devcenter.heroku.com/articles/procfile#developing_locally_with_foreman [2]: http://blog.daviddollar.org/2011/05/06/introducing-foreman.html [3]: https://devcenter.heroku.com/articles/procfile#scaling_a_process_type

Scheduling resque-jobs

If you want to run a resque job after every regular interval of time, just like cron jobs, there is a gem "resque-scheduler" which will do it easily. [More on this gem][1] [1]: https://github.com/bvandenbos/resque-scheduler#readme

SOAP Vs REST Web services

Good articles to understand the difference in SOAP and REST. These will make it easy to understand where you should use SOAP/REST. REST vs SOAP REST vs SOAP using http

Callbacks.

This is a good reference for Active record callbacks. [link to callbacks][1] [1]: http://api.rubyonrails.org/classes/ActiveRecord/Callbacks.html