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
00:16 ~ $ brew install wkhtmltopdf | |
==> Downloading http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-4.7.1.tar.gz | |
File already downloaded and cached to /Users/jproudman/Library/Caches/Homebrew | |
==> Downloading patches | |
######################################################################## 100.0% | |
==> Patching | |
/usr/bin/patch: **** Only garbage was found in the patch input. | |
Error: Failure while executing: /usr/bin/patch -f -p1 -i 001-homebrew.diff |
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
# Generate all the stylesheets manually (from their Sass templates) before each restart. | |
before 'deploy:restart', 'sass:update' | |
namespace :sass do | |
desc 'Updates stylesheets if necessary from their Sass templates.' | |
task :update => :environment do | |
Sass::Plugin.options[:never_update] = false | |
Sass::Plugin.update_stylesheets | |
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
require 'rubygems'; require 'active_resource'; require 'new_relic_api' | |
servers = File.open("server_count.txt", "r").first.to_i | |
instances_per_server = 6 | |
cpu_burn_for_system = 1000.0 * 0.20 | |
NewRelicApi.api_key = "<Your API Key>" | |
account = NewRelicApi::Account.find(:first); | |
application = account.applications[3]; |
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 1; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 1024; | |
} | |
user daemon daemon; | |
http { |
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
[fog@fog bbg_basher]$ ruby bash.rb | |
0.3.13 | |
Deploying new server... | |
./lib/fog/lib/fog/core/model.rb:32:in `reload': undefined method `get' for nil:NilClass (NoMethodError) | |
from ./lib/fog/lib/fog/core/model.rb:44:in `wait_for' | |
from bash.rb:23 |
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
diff --git a/lib/fog/bluebox/models/compute/server.rb b/lib/fog/bluebox/models/compute/server.rb | |
index b447b82..5068d4f 100644 | |
--- a/lib/fog/bluebox/models/compute/server.rb | |
+++ b/lib/fog/bluebox/models/compute/server.rb | |
@@ -81,12 +81,12 @@ module Fog | |
def save | |
raise Fog::Errors::Error.new('Resaving an existing object may create a duplicate') if identity | |
requires :flavor_id, :image_id | |
- options = if !password && !public_key | |
+ options = if !attributes[:password] && !public_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
# Now we can install our packages. | |
packages = %w{ovzkernel.x86_64 vzctl.x86_64 vzctl-lib.x86_64 vzquota.x86_64} | |
packages.each do |pkg| | |
package pkg | |
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
namespace :delayed_job do | |
desc "Start delayed_job process" | |
task :start, :roles => :app do | |
run "PATH=$PATH:/opt/ree/bin && cd #{current_path} && RAILS_ENV=#{rails_env} script/delayed_job_ctl start" | |
end | |
desc "Stop delayed_job process" | |
task :stop, :roles => :app do | |
run "PATH=$PATH:/opt/ree/bin && cd #{current_path} && RAILS_ENV=#{rails_env} script/delayed_job_ctl stop" | |
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
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'fog' | |
@bluebox_api_key = "CHANGEME" | |
@flavor_id = "94fd37a7-2606-47f7-84d5-9000deda52ae" # Block 1GB Virtual Server | |
@image_id = "03807e08-a13d-44e4-b011-ebec7ef2c928" # Ubuntu 10.04 x64 LTS | |
# Grab our current list of servers |
NewerOlder