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
config.vm.share_folder "openphoto", "/var/www/openphoto", "/path/to/openphoto/frontend", :owner => "www-data", :group => "vagrant" |
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
config.vm.provision :chef_solo do |chef| | |
chef.json = { | |
:mysql => { | |
:server_root_password => "secretpassword" | |
} | |
} | |
chef.add_recipe("mysql::server") | |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant::Config.run do |config| | |
config.vm.box = "lucid32" | |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant::Config.run do |config| | |
config.vm.box = "vagrant-oneiric" | |
config.vm.provision :chef_solo do |chef| | |
chef.binary_path = "/path/to/chef/binary/" | |
chef.cookbooks_path = "/path/to/chef/cookbooks" |
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
require 'AWS' | |
... | |
role (:app) { instance_ip_addresses(SERVER_TAG) } | |
.... |
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
FSSOMWDECAF |
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
cd /home/path/to/app/current && /home/username/.rvm/wrappers/ruby-1.9.2-p180@app_name/rake RAILS_ENV=production cron:calculate_stats |
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
# This file is copied to spec/ when you run 'rails generate rspec:install' | |
ENV["RAILS_ENV"] ||= 'test' | |
require File.expand_path("../../config/environment", __FILE__) | |
require 'rspec/rails' | |
require 'capybara/rails' | |
require 'capybara/rspec' | |
require 'capybara/session' | |
require 'factory_girl' | |
Dir.glob(Rails.root.join("spec", "factories", "*.rb").to_s).each do |f| |
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 new | |
@order = Order.new() | |
respond_to do |format| | |
format.html { | |
@company = Company.find(params[:company_id]) | |
@cart.empty! | |
@order.company = @company | |
@order.delivery_method_id = @company.delivery_method_id | |
@order.location_id = session[:location_id] |
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
javascript:var%20el=document.createElement('div');el.style.zIndex=10000;el.style.position='absolute';el.style.padding='2em';el.style.top=0;el.style.backgroundColor='%23ffffcc';el.style.border='1px%20solid%20%23008000';el.style.color='%23000%20!important';el.style.fontFamily='Arial,%20sans-serif';el.style.textAlign='left';el.innerHTML='View%20the%20following%20feeds%20in%20Google%20Reader:';var%20found%20=%20false;var%20links%20=%20document.getElementsByTagName('link');for%20(var%20i%20=%200,%20link;%20link%20=%20links%5Bi%5D;%20i++)%20%7B%20var%20type%20=%20link.getAttribute('type');%20var%20rel%20=%20link.getAttribute('rel');%20var%20title%20=%20link.getAttribute('title');%20if%20(type%20&&%20(type%20==%20'application/rss+xml'%20%7C%7C%20type%20==%20'application/atom+xml')%20&&%20rel%20&&%20rel%20==%20'alternate')%20%7B%20var%20href%20=%20link.getAttribute('href');%20if%20(!href.match(/%5Ehttp/))%20%7B%20var%20path%20=%20(href.match(/%5E%5C//))%20?%20'/'%20:%20location.pathname;%20href='http://'%20+%20locati |