Setting up simple OmniAuth authentication with Facebook
Posted on Feb 01 in Ruby on Rails, Tutorials | (11) Comments
If you have watched Ryan Bates’ tutorial Simple OmniAuth you probably already know OmniAuth is awesome.
Ryan doesn’t go into details about setting up OmniAuth with Facebook so this post has a couple of pointers to help out in that regard. It’s meant as a continuation to the screencast, so if you haven’t seen it start there.
Configuring Nginx and Unicorn
Posted on Jul 09 in General, Ruby on Rails, Scalability | (13) Comments
I first heard about Unicorn in an interview with 37Signal’s server admin Mark Imbriaco and it made me really curious. There are a few great resources explaining how Unicorn works and a neat benchmark comparing Mongrel, Passenger and Unicorn. I will share my experience playing with Nginx and Unicorn on a Debian Lenny box.
Handling paperclip attachments with the same name
Posted on Jun 16 in Ruby on Rails | (1) Comment
This quick post is about some Paperclip-related code that I see quite frequently that could cause problems. It’s easy to miss this stuff in development and then get major headaches later.
Setting up a High Availability Ruby on Rails environment with keepalived, nginx, HA Proxy and Thin on Debian Lenny
Posted on May 15 in General, Ruby on Rails, Scalability, Tutorials | (10) Comments
Contents
- Configure Keepalived and Nginx
- Configure HA Proxy
- Configure Thin
Overview
Nginx and HA Proxy have similar functions: they can both be used as reverse proxies and load balancers. In our case Nginx will be the reverse proxy and HA Proxy will be the load balancer. Nginx is great for dealing with SSL encryption, gzip compression or talking to a cache server (Varnish, memcached).
Building your own Lightbox with Javascript (part 1)
Posted on Feb 21 in General, jQuery, Tutorials | (1) Comment
See the final result of part 1: Demo
Why write your own lightbox?
The simple answer is: to learn how it’s done. If you’re going to use if for an image gallery, embed flash and videos or even to load Ajax content you are probably better off using one of the many existing lightbox plugins (Thickbox, FancyBox). If you plan to use a lightbox for more complex applications like the admin back end of a cms (see the future Drupal 7 Admin Panel ) then you should either fully understand every line of your plugin or write your own.
This tutorial assumes some knowledge of Javascript. If you are just starting Javascript I highly recommend watching Jeffrey Way’s Javascript from null video series on nettuts.com.