This file contains hidden or 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 'pathname' | |
| class Pathname | |
| def hashes | |
| children.map do |entry| | |
| if entry.directory? | |
| sha1 = [Digest::SHA1.hexdigest(entry.hashes.sort.join("")), entry] | |
| else | |
| sha1 = [Digest::SHA1.hexdigest(entry.read), entry] | |
| end |
This file contains hidden or 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
| curl https://github.com/beautifulcode/ssh-copy-id-for-OSX/ssh-copy-id.sh -o /usr/local/bin/ssh-copy-id | |
| chmod +x /usr/local/bin/ssh-copy-id |
This file contains hidden or 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
| app_home = "/home/mi/production" | |
| workers = 5 | |
| Bluepill.application("mi_delayed_job", :log_file => "#{app_home}/shared/log/bluepill.log") do |app| | |
| (0...workers).each do |i| | |
| app.process("delayed_job.#{i}") do |process| | |
| process.working_dir = "#{app_home}/current" | |
| process.start_grace_time = 10.seconds | |
| process.stop_grace_time = 10.seconds | |
| process.restart_grace_time = 10.seconds |
This file contains hidden or 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
| remove_file 'Gemfile' | |
| create_file 'Gemfile' do | |
| <<-GEMFILE | |
| source 'http://rubygems.org' | |
| gem 'rails', '3.0.1' | |
| # The ORM which we will stake our application | |
| gem "mongoid", ">= 2.0.0.beta.19" | |
| gem "bson_ext", ">= 1.1.1" |
This file contains hidden or 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
| create_file ".rvmrc" do | |
| <<-RVMRC | |
| rvm_gemset_create_on_use_flag=1 | |
| rvm gemset use #{app_name} | |
| RVMRC | |
| end | |
| remove_file 'Gemfile' | |
| create_file 'Gemfile' do | |
| <<-GEMFILE |
This file contains hidden or 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
| if defined?(PhusionPassenger) | |
| PhusionPassenger.on_event(:starting_worker_process) do |forked| | |
| if forked | |
| MyModel.connection.reconnect! | |
| else | |
| # We're in conservative spawning mode. We don't need to do anything. | |
| end | |
| end | |
| end |
This file contains hidden or 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
| Server Software: Apache/2.2.14 | |
| Server Port: 80 | |
| Document Path: / | |
| Document Length: 20266 bytes | |
| Concurrency Level: 5 | |
| Time taken for tests: 344.008 seconds | |
| Complete requests: 1000 | |
| Failed requests: 47 |
This file contains hidden or 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
| Server Software: nginx/0.7.67 | |
| Server Port: 80 | |
| Document Path: / | |
| Document Length: 20266 bytes | |
| Concurrency Level: 5 | |
| Time taken for tests: 304.670 seconds | |
| Complete requests: 1000 | |
| Failed requests: 0 |
This file contains hidden or 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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <kml xmlns="http://www.opengis.net/kml/2.2"> | |
| <Folder> | |
| <name>CrisisCamp</name> | |
| <open>1</open> | |
| <description> | |
| Entries from CrisisCamp | |
| </description> | |
| <Placemark> | |
| <name>Khairewala</name> |