Skip to content

Instantly share code, notes, and snippets.

Deploy Rails app to digitalocean with nginx, unicorn, capistrano & postgres

Create droplet of your liking (ubuntu 12.10 x32)

ssh to root in terminal with your server ip

ssh root@123.123.123.123

Add ssh fingerprint and enter password provided in email

module CalendarHelper
def calendar(date = Date.today, &block)
Calendar.new(self, date, block).table
end
class Calendar < Struct.new(:view, :date, :callback)
HEADER = %w[SUN MON TUE WED THU FRI SAT]
START_DAY = :sunday
delegate :content_tag, to: :view
<div class="row">
<div class="large-12 columns calendar-container">
<h3 class="month">
<a href="/admin/analytics?class=cal-larr&amp;date=2013-11-01">&lt;</a>
December 2013
<a href="/admin/analytics?class=cal-rarr&amp;date=2014-01-01">&gt;</a>
</h3>
<section class="calendar" role="main">
<ul class="day-row">
<li class="day">SUN</li>