Skip to content

Instantly share code, notes, and snippets.

View stereosupersonic's full-sized avatar

MICE Portal stereosupersonic

View GitHub Profile
@ryansobol
ryansobol / gist:5252653
Last active November 22, 2023 11:53
15 Questions to Ask During a Ruby Interview

Originally published in June 2008

When hiring Ruby on Rails programmers, knowing the right questions to ask during an interview was a real challenge for me at first. In 30 minutes or less, it's difficult to get a solid read on a candidate's skill set without looking at code they've previously written. And in the corporate/enterprise world, I often don't have access to their previous work.

To ensure we hired competent ruby developers at my last job, I created a list of 15 ruby questions -- a ruby measuring stick if you will -- to select the cream of the crop that walked through our doors.

What to expect

Candidates will typically give you a range of responses based on their experience and personality. So it's up to you to decide the correctness of their answer.

@steveclarke
steveclarke / capybara.md
Created April 10, 2012 17:32
RSpec Matchers

Capybara

save_and_open_page

Matchers

have_button(locator)
@stereosupersonic
stereosupersonic / linux_setup.md
Last active March 30, 2021 09:21
my linux (debian) setup
@mpapis
mpapis / osx_rails_env_setup_in_1_step.md
Created March 30, 2012 04:54 — forked from solnic/osx_rails_env_setup_in_6_steps.md
One step to get up'n'running with Rails on OS X or Linux

Use this command and follow the instructions:

curl -L get.rvm.io | bash -s stable --rails

Other options include(any gems imply --ruby):

--ruby=1.9.3
--gems=rails,gist

Optionally on OSX install homebrew, use brew command to install whatever database engine you need, ie brew install sqlite

@stereosupersonic
stereosupersonic / validate_email.rb
Created February 4, 2010 13:20
validate email adress
validates_format_of :email,
:with => /^([^\s]+)((?:[-a-z0-9]\.)[a-z]{2,})$/i
@stereosupersonic
stereosupersonic / time_logging_block.rb
Created October 14, 2009 10:35
Time Logging Proc
def self.in_time_log(name="",logger=nil)
(logger || RAILS_DEFAULT_LOGGER).info("#{name} start")
start_time = Time.now
yield
duration = Time.now-start_time
(logger || RAILS_DEFAULT_LOGGER).info("#{name} duration: #{ ([duration/3600, duration/60 % 60, duration % 60].map{|t| "%02d" % t.to_i.to_s}).join(':')}")
end