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
sudo sed -i -e 's/mirror.rackspace.com\|archive.ubuntu.com\|security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list |
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 should go at the top of the landing page!!! | |
<script type="text/javascript"> | |
var _gaq = _gaq || []; | |
_gaq.push(['_setAccount', 'UA-648272-12']); | |
_gaq.push(['_setDomainName', 'investingchannel.com']); | |
_gaq.push(['_setAllowLinker', true]); | |
_gaq.push(['_trackPageview']); |
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
Started GET "/books" for 96.226.128.2 at 2013-10-22 20:18:56 +0000 | |
Processing by Web::BooksController#index as HTML | |
User Load (2.7ms) SELECT `users`.* FROM `users` WHERE `users`.`id` = 38 LIMIT 1 | |
(2.4ms) SELECT COUNT(*) FROM `reading_actions` WHERE `reading_actions`.`user_id` = 38 AND `reading_actions`.`action_type` = 'have_read' | |
(75.2ms) SELECT COUNT(*) FROM `reading_actions` WHERE `reading_actions`.`user_id` = 38 AND `reading_actions`.`action_type` = 'want_to_read' | |
(54.7ms) SELECT COUNT(*) FROM `reading_actions` LEFT OUTER JOIN readings ON readings.reading_action_id = reading_actions.id WHERE `reading_actions`.`user_id` = 38 AND (reading_actions.readable_type in ('Book', 'SocialBook') AND reading_actions.action_type = 'reading_now') AND (CASE WHEN readings.is_private = 1 THEN readings.user_id = 38 ELSE 1 = 1 END) | |
Rendered shared/v2/_breadcrumb.haml (2.3ms) | |
(2.8ms) SELECT COUNT(count_column) FROM (SELECT 1 AS count_column FROM `reading_actions` LEFT OUTER JOIN readings ON readings.readin |
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
I decided to add RDS environment to my testing. So I can compare AWS(RDS) to rackspace(Rack DB) to GCE (cloud-SQL) and this is what I find running the same benchmark on all three. GCE is in the same zone, and for comparison AWS server is also in the same zone as RDS. | |
benchmark I am using is perl test-wisconsin from sql bench | |
Wisconsin benchmark test | |
Time for create_table (3): 1 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU) | |
Inserting data | |
Time to insert (31000): 317 wallclock secs ( 1.95 usr 2.09 sys + 0.00 cusr 0.00 csys = 4.04 CPU) | |
Time to delete_big (1): 0 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU) |
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
➜ crockpot git:(master) ✗>knife bootstrap ---- ommitted ----- | |
Bootstrapping Chef on 173.255.117.224 | |
173.255.117.224 Starting Chef Client, version 11.6.0 | |
173.255.117.224 resolving cookbooks for run list: ["ohai", "sudo", "users::sysadmins", "apt", "git", "snap", "locales", "imagemagick", "logrotate", "rvm::user", "mysql", "bookshout_passenger", "bookshout_passenger::qa", "instramentalapp_agent"] | |
173.255.117.224 Synchronizing Cookbooks: | |
173.255.117.224 - instramentalapp_agent | |
173.255.117.224 - bookshout_passenger | |
173.255.117.224 - openssl | |
173.255.117.224 - build-essential | |
173.255.117.224 - mysql |
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 find_container(container_name, obj = nil) | |
container_info = requested_container_info(container_name) | |
container_name = clean_container_name(container_name) | |
parts = [prefix] | |
parts << container_name unless container_name == 'default' | |
name = parts.compact.join('-') |
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
g_dirs = g_connection.directories.all.map(&:key) | |
puts g_dirs | |
# create all the buckets that we need on google. | |
rs_connection.directories.each do |dir| | |
#refresh the list of google dirs | |
g_dirs = g_connection.directories.all.map(&:key) | |
dir_name_arr = dir.key.split("-") |
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
app-1:~$ rvm install ruby-1.9.3-p194 | |
Searching for binary rubies, this might take some time. | |
Checking requirements for debian. | |
Installing requirements for debian. | |
Hit http://gce_debian_mirror.storage.googleapis.com wheezy Release.gpg | |
Hit http://gce_debian_mirror.storage.googleapis.com wheezy Release | |
Hit http://gce_debian_mirror.storage.googleapis.com wheezy/main Sources | |
Hit http://packages.cloudpassage.com debian Release.gpg | |
Hit http://security.debian.org wheezy/updates Release.gpg | |
Hit http://gce_debian_mirror.storage.googleapis.com wheezy/main amd64 Packages |
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 self.subscribe_user_batch(users) | |
batch = users.map { |user| {EMAIL: user.email, FNAME: user.first_name, LNAME: user.last_name} } | |
Gibbon.batch_subscribe(:id => current_marketing_list['id'], :batch => batch) | |
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
➜ getsocialbooks.com git:(dev) ✗>rake assets:precompile | |
/Users/benjohnson/.rvm/gems/ruby-1.9.3-p392@bookshout/gems/zipruby-0.3.6/lib/zipruby.bundle: warning: already initialized constant VERSION | |
DEPRECATION WARNING: config.generators in Rails::Railtie is deprecated. Please use config.app_generators instead. (called from require at /Users/benjohnson/.rvm/gems/ruby-1.9.3-p392@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:72) | |
/Users/benjohnson/.rvm/gems/ruby-1.9.3-p392@bookshout/gems/activesupport-3.1.12/lib/active_support/dependencies.rb:240:in `block in require': iconv will be deprecated in the future, use String#encode instead. | |
/Users/benjohnson/.rvm/rubies/ruby-1.9.3-p392/bin/ruby /Users/benjohnson/.rvm/gems/ruby-1.9.3-p392@bookshout/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets | |
/Users/benjohnson/.rvm/gems/ruby-1.9.3-p392@bookshout/gems/zipruby-0.3.6/lib/zipruby.bundle: warning: already initialized constant VERSION | |
DEPRECATION WARNING: config.generators in Rails::Railtie is depre |
NewerOlder