Skip to content

Instantly share code, notes, and snippets.

View beaucollins's full-sized avatar
🃏
Special Author

Beau Collins beaucollins

🃏
Special Author
View GitHub Profile
Deploying a Rails App with EC2 + S3 + Ubuntu
============================================
Create EC2 Instance
-------------------
create new instance ami-bf5eb9d6 [http://alestic.com/](http://alestic.com/)
create new elastic ip
attach elastic ip to instance
point dns to elastic ip
[
{
:name => 'name',
:title => 'title',
:body => 'body'
},
{
:name => 'name2',
:title => 'title2',
:body => 'body2'
<%- form_for @album do |album_form| -%>
<!-- Album Form Stuff -->
<%-
# file_fields_for is where the magic happens. You supply the association to the model
# that has the 'attachment' as well as the property on that model that will receive
# the file upload data. This will take care of displaying the necessary upload fields
#
-%>
<%= album_form.attachment_fields_for :photos, :data %>
<%-
var Timer = function(end, options){
if(!options) options = {};
if(!options['timerInterval']) options['timerInterval'] = 1;
if(!options['periods']) options['periods'] = {
'milliseconds' : 1,
'seconds' : 1000,
'minutes' : 60,
'hours' : 60,
'days' : 24,
'weeks' : 7
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title>
Switzerland
</title>
<meta name="description" content="WE CONCEPT, WE PRODUCE, WE MANAGE. Digital, broadcast, print, outdoor, out of the box, whatever&rsquo;s right. And we do so in the most compelling, audacious, intriguing, knowledgeable, practiced, insightful, experienced way possible." />
<script type="text/javascript" src="/javascript/jquery-1.3.2.min.js" charset="utf-8"></script>
require 'rubygems'
require 'shoulda'
class WhateverTest < Test::Unit::TestCase
should "work" do
assert true
end
end
ActionController::Routing::Routes.draw do |map|
map.resources :famewars, :collection => {:download => :get, :thanks => :get, :past_winners => :get}, :path_names => {:past_winners => 'past-winners'}
end
(in /Users/bcollins/code/test)
past_winners_famewars GET /famewars/past-winners(.:format) {:controller=>"famewars", :action=>"past_winners"}
download_famewars GET /famewars/download(.:format) {:controller=>"famewars", :action=>"download"}
thanks_famewars GET /famewars/thanks(.:format) {:controller=>"famewars", :action=>"thanks"}
famewars GET /famewars(.:format) {:controller=>"famewars", :action=>"index"}
POST /famewars(.:format) {:controller=>"famewars", :action=>"create"}
new_famewar GET /famewars/new(.:format) {:controller=>"famewars", :action=>"new"}
edit_famewar GET /famewars/:id/edit(.:format) {:controller=>"famewars", :action=>"edit"}
famewar GET /famewars/:id(.:format) {:controller=>"famewars", :action=>"show"}
PUT /famewars/:id(.:format) {:controller=>"famewars", :action=>"update"}
(in /Users/bcollins/code/test)
root / {:action=>"index", :controller=>"settings"}
simple_captcha /simple_captcha/:action {:controller=>"simple_captcha"}
user_roles GET /users/:user_id/roles(.:format) {:controller=>"roles", :action=>"index"}
POST /users/:user_id/roles(.:format) {:controller=>"roles", :action=>"create"}
new_user_role GET /users/:user_id/roles/new(.:format) {:controller=>"roles", :action=>"new"}
edit_user_role GET /users/:user_id/roles/:id/edit(.:format) {:controller=>"roles", :action=>"edit"}
user_role GET /users/:user_id/roles/:id(.:format) {:controller=>"roles", :action=>"show"}
PUT /users/:user_id/roles/:id(.:format) {:controller=>"roles", :act
(in /Users/bcollins/Projects/morrowsnowboards.com)
root / {:action=>"index", :controller=>"settings"}
simple_captcha /simple_captcha/:action {:controller=>"simple_captcha"}
users GET /users {:action=>"index", :controller=>"users"}
formatted_users GET /users.:format {:action=>"index", :controller=>"users"}
POST /users {:action=>"create", :controller=>"users"}
POST /users.:format {:action=>"create", :controller=>"users"}
new_user GET /users/new {:action=>"new", :controller=>"users"}
formatted_new_user