Skip to content

Instantly share code, notes, and snippets.

@oodavid
oodavid / README.md
Last active June 12, 2024 00:28 — forked from aronwoost/README.md
Deploy your site with git

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/
@jlecour
jlecour / gist:978307
Created May 18, 2011 09:55
How MongoDB (Ruby driver) handle Date/DateTime/Time
>> coll.insert({:date => Date.today})
BSON::InvalidDocument: Date is not currently supported; use a UTC Time instance instead.
>> coll.insert({:date => DateTime.now})
BSON::InvalidDocument: DateTime is not currently supported; use a UTC Time instance instead.
>> coll.insert({:date => Time.now}) #=> BSON::ObjectId('4dd39768b98f703261000003')
require 'rubygems'
require 'sinatra'
require 'haml'
get '/' do
haml :index, :layout => false #=> Don't use layout.haml.
end
get '/about' do
haml :about, :layout => 'layout2' #=> Use layout2.haml.