Link Checking Made Easy with Xenu

Disclaimer: this article has nothing to do with Scientology other than the picture of Tom Cruise. Xenu is a Windows program which allows you to quickly crawl a website and list all known URL’s, broken links, and outbound links. This is massively helpful for SEO folks, web content creators, and other people who need a quick tool and are too lazy to program it...

Sync a database with Capistrano

Here’s a quick capistrano task for synchronizing a remote database to your local development environment:   set :application, "appname" set :application_path, "/home/someurl/apps" set :user, "appuser" set :password, "***********" set :use_sudo, false   set :production_database,'mydb_production' set :production_dbhost, 'localhost' set :dbuser, 'dbadmin' set :dbpass, '************'   desc "Synchronizes remote database to local development database" task :sync_to_local, :roles => :web do sql_out =...

Painless db backups in Rails

Quite often in Rails projects, I need some way to backup the contents of database quickly. The script below is an easy way to backup the database of your current environment using the database.yml file already set up in your Rails project. Feel free to modify the below script to do your bidding. /script/backup_db: #!/usr/bin/env ruby require File.dirname(__FILE__) + '/../config/boot' require 'erb' require 'yaml'   unless config = YAML::load(ERB.new(IO.read(RAILS_ROOT + "/config/database.yml")).result)[RAILS_ENV] abort "No database found...