Removing .svn folders recursively
If you want to recursively delete all the Subversion folders from a working copy (for deployment or whatnot), this works well:
rm -rf `find . -type d -name .svn`
If you want to recursively delete all the Subversion folders from a working copy (for deployment or whatnot), this works well:
rm -rf `find . -type d -name .svn`
xen-tools is a useful connection of scripts.
However, when you're creating a new Xen guest, don't forget to specify the correct gateway and netmask. Otherwise, you may end up spending a whole evening trying to figure out a routing problem which doesn't actually exist.
xen-create-image --hostname=example.com\
--ip=XXX.XXX.XXX.XXX\
--gateway=XXX.XXX.XXX.XXX\
--netmask 255.255.255.0\
--dist=etch\
--passwd\
--boot
I run Debian Etch on a 256MB Xen instance (provided by Mampi). For quite a long time I've been running into out of memory errors when using RubyGems. The usual transcript would go something like this:
$ sudo gem install rails
Bulk updating Gem source index for: http://gems.rubyforge.org
Killed
For a while, I hacked around this problem by increasing my RAM to 512MB when I needed to run RubyGems (which is a terrible solution, but I have the ability to increase my RAM at will, and when all you have is a hammer, everything looks like a nail). I was using the packaged version of RubyGems (0.90), which it turns out is horribly out of date now. I can't find a definitive source, but various mailing lists are pointing to an issue with the YAML parser causing Gems to use far too much memory.
The upgrade to a more recent version of RubyGems is fairly simple:
wget http://rubyforge.org/frs/download.php/38646/rubygems-1.2.0.tgz
tar xzf rubygems-1.2.0.tgz
cd rubygems-1.2.0.tgz
sudo ruby setup.rb
If you haven't removed your old (packaged) version of RubyGems, you will need to do so now, then create a symlink to the new Gems executable:
sudo ln -s /usr/bin/gem1.8 /usr/bin/gem
If you run the new version of Gems, you'll notice much reduced RAM usage.