PNOI Judge

The first Philippine National Olympiad in Informatics (PNOI 2008) will be held on March 15, 2008 at Ateneo de Manila University, Loyola Heights, Quezon City.

PNOI is an individual programming contest for high school students. I’m a judge (and 4 others) at this contest.

Click here for the details.

Run from Capistrano

You can run shell commands from capistrano using the run method. For example, to create a symlink from the shared directory to the current directory, you’ll write

run "ln -nfs #{deploy_to}/shared/config/database.yml #{release_path}/config/database.yml"

run can also take a block like this

run "rsync /path/to/file host:/path/to/file" do |channel, stream, text| "[#{stream}] #{text}"
  output = case text
  when /\bpassword.*:/i
  when %r{\(yes/no\)}
  channel.send_data(output) if output

When you run a command it might ask for your password. To handle this in capistrano, use send_data to send a response.

Check lib/capistrano/recipes/deploy/scm/subversion.rb on the capistrano gem to see how capistrano handles subversion commands.