Skip to content

Instantly share code, notes, and snippets.

View amitpatelx's full-sized avatar

Amit Patel amitpatelx

View GitHub Profile
@amitpatelx
amitpatelx / mine-open.desktop
Last active October 14, 2015 06:30
#Better Errors #Rubymine #Ubuntu
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Terminal=false
Exec=/home/amit/scripts/mine-open.sh %u
Name[en_US]=MineOpen
Comment[en_US]=Small, easy-to-use program to access Rubymine
Name=MineOpen
Comment=Small, easy-to-use program to access Rubymine
@amitpatelx
amitpatelx / test.rb
Created September 30, 2015 12:39 — forked from ParthivPatel-BTC/test.rb
Delete all database records
ActiveRecord::Base.connection.tables.map do |model|
unless ['schema_migrations', 'cic_user_profiles'].include?(model)
klass = model.capitalize.singularize.camelize.constantize
puts "Deleting #{klass}"
klass.delete_all
end
end

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.

@amitpatelx
amitpatelx / Gemfile
Created December 7, 2012 08:53 — forked from gvarela/Gemfile
web sockets with eventmachine and redis pub/sub
# A sample Gemfile
source "http://rubygems.org"
gem "redis"
gem 'eventmachine', :git => 'git://github.com/eventmachine/eventmachine.git'
gem "em-hiredis"
# gem "em-synchrony"
gem "em-websocket"