Code_sample is a project mainly written in PHP and RUBY, it's free.
Sample code in PHP and Ruby.
Samples of code in PHP and Ruby