This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cap deploy | |
* executing `deploy' | |
* executing `deploy:update' | |
** transaction: start | |
* executing `deploy:update_code' | |
executing locally: "git ls-remote git@github.com:andyferra/piggyback-savings.git master" | |
* executing "git clone -q git@github.com:andyferra/piggyback-savings.git /var/www/apps/piggybacksavings.com/releases/20090305184815 && cd /var/www/apps/piggybacksavings.com/releases/20090305184815 && git checkout -q -b deploy 0f8c9391ccf3c9630e7115df965152ac54a2291f && (echo 0f8c9391ccf3c9630e7115df965152ac54a2291f > /var/www/apps/piggybacksavings.com/releases/20090305184815/REVISION)" | |
servers: ["209.20.75.75"] | |
[209.20.75.75] executing command | |
** [209.20.75.75 :: out] Permission denied (publickey). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
deploy@Piggyback:~$ git clone git@github.com:andyferra/piggyback-savings.git | |
Initialized empty Git repository in /home/deploy/piggyback-savings/.git/ | |
Permission denied (publickey). | |
fatal: The remote end hung up unexpectedly | |
fetch-pack from 'git@github.com:andyferra/piggyback-savings.git' failed. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
co = checkout | |
st = status | |
br = branch | |
ci = commit | |
df = diff | |
lg = log -p | |
[apply] | |
whitespace = nowarn | |
[color] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class LabeledFormBuilder < ActionView::Helpers::FormBuilder | |
%w(text_field password_field file_field).each do |method_name| | |
define_method(method_name) do |field_name, *args| | |
options = args.extract_options! | |
options[:class] = field_class(options, method_name) | |
@template.content_tag(:div, field_label(field_name, options) + super(field_name, options), :class => 'field') | |
end | |
end | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set :stages, %w(staging production) | |
set :default_stage, "staging" | |
require 'capistrano/ext/multistage' | |
set :use_sudo, false # deploy user should own the application directory | |
set :user, 'deploy' | |
set :runner, user | |
default_run_options[:pty] = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class PostsController < ApplicationController | |
before_filter :require_user, :only => :preview | |
caches_page :index, :show, :with_tags | |
def index | |
@posts = Post.paginate( :order => 'published_at DESC', :page => params[:page] ) | |
respond_to do |wants| | |
wants.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<VirtualHost *:80> | |
<Directory /var/www/public_html/***********.com/production/current/public> | |
Options FollowSymLinks | |
AllowOverride None | |
Order allow,deny | |
Allow from All | |
</Directory> | |
DocumentRoot /var/www/public_html/***********.com/production/current/public |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def javascript_for_controller | |
if File.exists?( File.join( RAILS_ROOT, 'public/javascripts', "#{params[:controller]}.js") ) | |
javascript_include_tag params[:controller] | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Supresses automatic updates of SASS so as not to offend your Heroku slug | |
Sass::Plugin.options[:never_update] = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package { | |
import flash.display.*; | |
import flash.events.*; | |
import net.slideshowpro.slideshowpro.*; | |
public class Slideshow extends Sprite { | |
private var _ssp; | |
private var _flashVars; |