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
| set :max_asset_age, 2 ## Set asset age in minutes to test modified date against. | |
| after "deploy:finalize_update", "deploy:assets:determine_modified_assets", "deploy:assets:conditionally_precompile" | |
| namespace :deploy do | |
| namespace :assets do | |
| desc "Figure out modified assets." | |
| task :determine_modified_assets, :roles => assets_role, :except => { :no_release => true } do | |
| set :updated_assets, capture("find #{latest_release}/app/assets -type d -name .git -prune -o -mmin -#{max_asset_age} -type f -print", :except => { :no_release => true }).split |
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
| set :rails_env, :production | |
| set :unicorn_binary, "/usr/bin/unicorn" | |
| set :unicorn_config, "#{current_path}/config/unicorn.rb" | |
| set :unicorn_pid, "#{current_path}/tmp/pids/unicorn.pid" | |
| namespace :deploy do | |
| task :start, :roles => :app, :except => { :no_release => true } do | |
| run "cd #{current_path} && #{try_sudo} #{unicorn_binary} -c #{unicorn_config} -E #{rails_env} -D" | |
| end | |
| task :stop, :roles => :app, :except => { :no_release => true } do |
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
| namespace :ubuntu do | |
| desc "Setup Environment" | |
| task :setup_env, :roles => :app do | |
| update_apt_get | |
| install_dev_tools | |
| install_git | |
| install_subversion | |
| install_sqlite3 | |
| # Install and setup RVM instead of old Rails stack | |
| #install_rails_stack |
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 'sinatra' | |
| require 'redis' | |
| require 'json' | |
| require 'date' | |
| class String | |
| def &(str) | |
| result = '' | |
| result.force_encoding("BINARY") |
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
| import java.util.Arrays; | |
| import me.prettyprint.cassandra.model.HColumnImpl; | |
| import me.prettyprint.cassandra.serializers.CompositeSerializer; | |
| import me.prettyprint.cassandra.serializers.StringSerializer; | |
| import me.prettyprint.cassandra.utils.TimeUUIDUtils; | |
| import me.prettyprint.hector.api.Cluster; | |
| import me.prettyprint.hector.api.Keyspace; | |
| import me.prettyprint.hector.api.beans.Composite; | |
| import me.prettyprint.hector.api.ddl.ColumnFamilyDefinition; |
NewerOlder