VPS Ubuntu 14.04(update to 16.04) x64 + Rails 4 + Nginx + Unicorn + MySQL + PostgreSQL + Capistrano 3
SSH into Root
local$ ssh root@123.123.123.123
SSH into Root
local$ ssh root@123.123.123.123
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.
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.
[Unit] | |
Description=Puma HTTP Server | |
Requires=network.target | |
[Service] | |
Type=simple | |
User=deployer | |
WorkingDirectory=/home/deployer/apps/pergam/current | |
ExecStart=/bin/bash -lc 'bundle exec puma -C /home/deployer/apps/pergam/shared/puma.rb' |
class ArrayCompressor | |
def initialize(arr:) | |
@arr = arr.dup | |
end | |
def compressed | |
compressed_array = [] | |
while !@arr.empty? do |
gem 'deep_merge' |
# frozen_string_literal: true | |
# Makes BULK INSERT for ActiveRecord rows | |
class ActiveRecord::Base | |
def import!(record_list, options = {}) | |
batch_size = options[:batch_size] || 1000 | |
raise ArgumentError "record_list not an Array of Hashes" unless valid_record_list?(record_list) | |
return record_list if record_list.empty? | |
record_list.each_slice(batch_size).each do |records| |