gem install rails --pre
rails new my_app -T
| =begin | |
| Capistrano deployment email notifier for Rails 3 | |
| Do you need to send email notifications after application deployments? | |
| Christopher Sexton developed a Simple Capistrano email notifier for rails. You can find details at http://www.codeography.com/2010/03/24/simple-capistrano-email-notifier-for-rails.html. | |
| Here is Rails 3 port of the notifier. | |
| The notifier sends an email after application deployment has been completed. |
| #!/usr/bin/env ruby | |
| # | |
| # One-liner | |
| # curl -fsS https://gist.github.com/raw/542746/install_rvm.rb | ruby -e '$script=STDIN.read;eval $script' | |
| # | |
| # This script installs to /usr/local only. It assumes theres an | |
| # admin group on your system - either "wheel", "admin", or "staff" | |
| # | |
| # Sudo is used a few times during the initial install. But anyone | |
| # in admin group can manage rvm (regardless of sudo privelidges) |
| # An example of using Cloudkick's oauth API. Make sure the | |
| # key you're using has read/write privileges (the default | |
| # is just execute privileges). You'll need the json and | |
| # the oauth gems installed as well for this to work properly. | |
| require 'rubygems' | |
| require 'oauth' | |
| require 'json' | |
| # make the consumer out of your secret and key |
| #!/usr/bin/env ruby | |
| # | |
| # One-liner | |
| # curl -fsS https://gist.github.com/raw/542746/install_rvm.rb | ruby -e '$script=STDIN.read;eval $script' | |
| # | |
| # This script installs to /usr/local only. It assumes theres an | |
| # admin group on your system - either "wheel", "admin", or "staff" | |
| # | |
| # Sudo is used a few times during the initial install. But anyone | |
| # in admin group can manage rvm (regardless of sudo privelidges) |
| " Vim functions to run RSpec and Cucumber on the current file and optionally on | |
| " the spec/scenario under the cursor. Within the context of a Rails app, will | |
| " prefer script/spec and script/cucumber over their system counterparts. | |
| function! RailsScriptIfExists(name) | |
| " Bundle exec | |
| if isdirectory(".bundle") || (exists("b:rails_root") && isdirectory(b:rails_root . "/.bundle")) | |
| return "bundle exec " . a:name | |
| " Script directory | |
| elseif exists("b:rails_root") && filereadable(b:rails_root . "/script/" . a:name) | |
| return b:rails_root . "/script/" . a:name |
| ;; emacs configuration | |
| (push "/usr/local/bin" exec-path) | |
| (add-to-list 'load-path "~/.emacs.d") | |
| (setq make-backup-files nil) | |
| (setq auto-save-default nil) | |
| (setq-default tab-width 2) | |
| (setq-default indent-tabs-mode nil) | |
| (setq inhibit-startup-message t) |
| group :assets do | |
| gem 'sass-rails', '~> 3.1.0' | |
| gem 'coffee-rails', '~> 3.1.0' | |
| gem 'uglifier' | |
| gem 'compass', '~> 0.12.alpha' | |
| # include other compass plugins here. E.g.: | |
| gem 'compass-susy-plugin', :require => 'susy' | |
| end |
| group :assets do | |
| gem 'sass-rails', '~> 3.1.0' | |
| gem 'coffee-rails', '~> 3.1.0' | |
| gem 'uglifier' | |
| gem 'compass' | |
| end |
| #!/bin/bash | |
| #ec2-run-instances --user-data-file chefserver-ec2-userdata.sh -g chef-server --key mykey -t m1.large --instance-initiated-shutdown-behavior terminate ami-1aad5273 | grep INSTANCE | INSTANCE=`cut -f 2` | xargs -I XXX ec2-create-tags XXX --tag Name=chefserver ; sleep 60 ; ec2-describe-instances $INSTANCE | grep INSTANCE | grep running | echo ssh ubuntu@`cut -f 4` | |
| # ami-1aad5273 - ubuntu 11.04 64bit server ebs | |
| # ami-2cc83145 - alestic ubunt 10.04 LTS 32bit server ebs | |
| # ami-2ec83147 - alestic ubunt 10.04 LTS 64bit server ebs | |
| # ami-8e1fece7 - amazon 64 bit ebs | |
| exec > >(tee /var/log/user-data.log|logger -t user-data -s 2>/dev/console) 2>&1 | |
| set -e -x | |
| # START CHEF BOOSTRAP |