View factory_doctor.rb
module FactoryGirl
module Doctor
module FloatDuration
refine Float do
def duration
t = self
format("%02d:%02d.%03d", t / 60, t % 60, t.modulo(1) * 1000)
View Rails Console Actionmailer test.rb
# Copy and paste this to the rails console to test your email settings
class MyMailer < ActionMailer::Base
def test_email
@recipients = ""
@from = ""
@subject = "Test from the Rails Console"
@body = "This is a test email"
View routes.rake
namespace :routes do
desc "Writes doc/routes.html. Requires Graphviz (dot)"
task :visualizer => :environment do'doc', 'routes.html'), 'wb') do |f|
f.write Rails.application.routes.router.visualizer
View amzn_wish_list_transfer.rb
#!/usr/bin/env ruby
require "rubygems"
require "mechanize"
TARGET_LOGIN_URL = "*Version*%3D1%26*entries*%3D0%26ref_%3Dnav_signin"
View linked_events.rb
require "faraday"
require "faraday_middleware"
require "pp"
connection = '' do |conn|
conn.response :json, :content_type => /\bjson$/
conn.adapter Faraday.default_adapter

A lot of these are outright stolen from Edward O'Campo-Gooding's list of questions. I really like his list.

I'm having some trouble paring this down to a manageable list of questions -- I realistically want to know all of these things before starting to work at a company, but it's a lot to ask all at once. My current game plan is to pick 6 before an interview and ask those.

I'd love comments and suggestions about any of these.

I've found questions like "do you have smart people? Can I learn a lot at your company?" to be basically totally useless -- everybody will say "yeah, definitely!" and it's hard to learn anything from them. So I'm trying to make all of these questions pretty concrete -- if a team doesn't have an issue tracker, they don't have an issue tracker.

I'm also mostly not asking about principles, but the way things are -- not "do you think code review is important?", but "Does all code get reviewed?".

View redis_helper.rb
module RedisHelper
# decode Redis value back to Ruby object
def self.decode(json)["#{}"])
# encode Ruby object for Redis
def encoded
self.updated_at = nil
View paypal_bogus_gateway.rb
# from:
require File.dirname(__FILE__) + '/paypal/paypal_common_api'
require File.dirname(__FILE__) + '/paypal/paypal_express_response'
require File.dirname(__FILE__) + '/paypal_express_common'
module ActiveMerchant #:nodoc:
module Billing #:nodoc:
class PaypalBogusGateway < BogusGateway

Keybase proof

I hereby claim:

  • I am vesan on github.
  • I am vesan ( on keybase.
  • I have a public key whose fingerprint is 170B 9C28 719A DB97 3711 EA7B E681 FE54 DF8F C3E3

To claim this, I am signing this object:

View action_mailer_localization_helpers.rb
module ActionMailerLocalizationHelpers
def using_locale(locale, &block)
original_locale = I18n.locale
I18n.locale = locale
return_value = yield
I18n.locale = original_locale