first Shut down the virtual machine
virsh shudown image.qcow2
then Resize the image with
qemu-img resize image.qcow2 +SIZE
http://guides.rubyonrails.org/migrations.html
# Hash with range keys | |
#--------------------- | |
# ex: | |
# h = range_hash({}) | |
# h[1..3] = 'v1' | |
# h[8..12] = 'v2' | |
#=> { 1..3 => 'v1', 8..12 => 'v2' } | |
# | |
# h[2..5] #=> 'v1' | |
# h[4..6] #=> nil |
(function($){ | |
//Finding min and max values in array from http://snippets.dzone.com/posts/show/769 | |
Array.prototype.min = function(){ return Math.min.apply({},this) }; | |
Array.prototype.max = function(){ return Math.max.apply({},this) }; | |
$.fn.masonry = function() { | |
this.each(function() { | |
var wall = $(this); |
#--------------------- | |
# how to use: | |
# h = range_hash({}) | |
# h[1..3] = 'v1' | |
# h[8..12] = 'v2' | |
# h #=> { 1..3 => 'v1', 8..12 => 'v2' } | |
# | |
# h[2..5] #=> 'v1' | |
# h[4..6] #=> nil |
Disclaimer: This file is called .a_README.markdown
so that it'll appear first
in the gist view (sorry for the horrible name)
Because this script prompts for user input, you have to execute it in a bit of an odd way. From a new command prompt simply copy and paste the following command and press return:
Disclaimer: This file is called .a_README.markdown
so that it'll appear first
in the gist view (sorry for the horrible name)
Because this script prompts for user input, you have to execute it in a bit of an odd way. From a new command prompt simply copy and paste the following command and press return:
if ENV['MY_RUBY_HOME'] && ENV['MY_RUBY_HOME'].include?('rvm') | |
begin | |
gems_path = ENV['MY_RUBY_HOME'].split(/@/)[0].sub(/rubies/,'gems') | |
ENV['GEM_PATH'] = "#{gems_path}:#{gems_path}@global" | |
require 'rvm' | |
RVM.use_from_path! File.dirname(File.dirname(__FILE__)) | |
rescue LoadError | |
raise "RVM gem is currently unavailable." | |
end | |
end |
# In the apps root directory run | |
# http://blog.phusion.nl/2010/09/21/phusion-passenger-running-multiple-ruby-versions/ | |
# passenger start -a localhost -p 3000 -e production -d | |
<VirtualHost *:80> | |
ServerName ranking.timehub.net | |
DocumentRoot /the/path/to/the/app/public | |
PassengerEnabled off | |
ProxyPass / http://localhost:3000/ | |
ProxyPassReverse / http://localhost:3000/ |