Skip to content

Instantly share code, notes, and snippets.

View dhirajbajaj's full-sized avatar

Dhiraj Bajaj dhirajbajaj

View GitHub Profile
@dhirajbajaj
dhirajbajaj / successful-rails-nginx-production-deployment.txt
Created January 12, 2016 11:42 — forked from jimmypocock/successful-rails-nginx-production-deployment.txt
Ruby on Rails / Postgres / Nginx / Passenger / Capistrano / Ubuntu 14.04 / AWS
#####################################
# 0. SET UP AWS (ASSUMING YOU HAVE ALREADY SET UP AN ACCOUNT)
# CREATE SECURITY GROUP
• In the EC2 Dashboard, click Security Groups, then Create Security Group.
• Enter Name
• Enter Description
• Rules to add:
- HTTP
- SSH
class @GoogleAnalytics
@load: ->
# Google Analytics depends on a global _gaq array. window is the global scope.
window._gaq = []
window._gaq.push ["_setAccount", GoogleAnalytics.analyticsId()]
# Create a script element and insert it in the DOM
ga = document.createElement("script")
ga.type = "text/javascript"