The provided Vagrant file and BASH provisioning script will setup a Precise 64 environment with version 1.0.1 of FoundationDB installed and ready to go.
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
worker_processes 5; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
include mime.types; | |
default_type application/octet-stream; |
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
load 'deploy' if respond_to?(:namespace) # cap2 differentiator | |
################################## | |
# Edit these | |
set :application, "app_name" | |
set :node_file, "server.js" | |
set :host, "app.example.com" | |
set :repository, "git://github.com/example/example.git" | |
set :branch, "master" | |
set :deploy_to, "/var/apps/#{application}" |
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
--- | |
:verbose: true | |
gem: --no-ri --no-rdoc | |
:update_sources: true | |
:sources: | |
- http://gems.rubyforge.org | |
:backtrace: false | |
:bulk_threshold: 1000 | |
:benchmark: false |
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
audio = Audio.first | |
configuration = RefNetAdmin::Application.config.zencoder | |
id = audio.id | |
bucket = configuration['bucket'] | |
base_path = configuration['base_path'] | |
options = { | |
input: audio.file.url(:original), | |
outputs: [ |
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 is a quick script for doing a mass rename of all files in an Amazon S3 bucket. | |
# In this case, the rename operation was to unescape all filenames which had been | |
# previously escaped in error. | |
############################# | |
# Configuration: | |
bucketname = "YOUR_S3_BUCKET_NAME" | |
access_key = 'YOUR_ACCESS_KEY_ID' | |
secret_key = 'YOUR_SECRET_ACCESS_KEY' |
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 'rvm' | |
rvm_env = RVM::Environment.new("jruby") | |
rvm_env.gemset_create(app_name) | |
rvm_env.gemset_use!(app_name) | |
create_file ".rvmrc", "rvm use jruby@trpsoa-#{app_name} --create" | |
run "rm README.rdoc" | |
run "rm doc/README_FOR_APP" |
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
source /usr/local/etc/bash_completion.d/git-prompt.sh | |
function parse_git_dirty { | |
local retval=$? | |
[[ $(git status 2> /dev/null | tail -n1) != "" && $(git status 2> /dev/null | tail -n1) != "nothing to commit, working directory clean" ]] && echo "*" | |
return $retval | |
} | |
function parse_git_branch { | |
local retval=$? |
The provided Vagrant file and BASH provisioning script will setup a Precise 64 environment with version 1.0.1 of FoundationDB installed and ready to go, along with a working RVM environment.
The Vagrantfile expects the vagrant-exec plugin to be present.
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
namespace :failover do | |
desc 'Roll failover back to primary database configuration' | |
task :primary do | |
File.delete('config/database.yml') | |
symlink('database.primary.yml', 'config/database.yml') | |
end | |
end | |
desc 'Failover to secondary database configuration' | |
task :failover do |
OlderNewer