Posted on March 21, 2011 by vladzloteanu
To pass rspec options from a rake task on command line, use the env variable SPEC_OPTS. For example, to enable backtrace logging when running all spec tests:
Filed under: ruby-on-rails, Tools | Tagged: rake, rspec, ruby, ruby-on-rais | Leave a comment »
Posted on December 18, 2010 by vladzloteanu
A. you are on a firewalled network, from where you can’t access github (remote port:9418 is not allowed)
B. you want to access a securized git server from home, but your IP is not on the git server’s whitelist.
and, of course, you have ssh access on a server that can do this.
A. Make a ssh tunnel to the git server
Me –> ServerWithSSHAccess –> GitServer
Filed under: git, linux | Tagged: firewall, git, github, linux, ssh, ssh port forwarding, ssh tunelling | 4 Comments »
Posted on August 23, 2010 by vladzloteanu
Posted on May 20, 2010 by vladzloteanu
When you have to parse huge XML files (hundreds of MB-like), loading the whole XML in memory is not an option.
Filed under: Data Extraction, ruby-on-rails | Tagged: dom, hapricot, nokogiri, rexml, ruby, ruby-on-rails, sax, xml, xml parser | 2 Comments »
Posted on May 6, 2010 by vladzloteanu
One of the recruiting companies that I have collaborated with in the past decided to publish many of theirs IT tests . You can find, among others, a Ruby on Rails test. Enjoy🙂
Filed under: interview questions | Tagged: interview questions, online tests, ruby-on-rails | Leave a comment »
Posted on May 3, 2010 by vladzloteanu
Parsed from: Wikipedia.
Available on YAML or JSON format.
- :airport_name: Charles de Gaulle International Airport (Roissy Airport)
:complete_location: Paris, France
Filed under: Data Extraction | Tagged: airport codes, hpricot, iata airport codes, icao codes, web scraping | 1 Comment »
Posted on April 6, 2010 by vladzloteanu
Let’s say you have a ‘cars’ table and a ‘bikes’ table, and the schema can not be changed. Some fields are the same, and you want to display ( paginate, search etc) a list with products that are both cars and bikes (from both the car and the bike models), sorted by their creation date.
This post is about how this can be accomplished using sql views.
Filed under: ActiveRecord, ruby-on-rails | Tagged: activerecord, heterogenous data, mysql, rails, rails_sql_views, sql, sql views, union | Leave a comment »