http://wiki.nginx.org/HttpLuaModule#Installation
install LuaJIT
$ brew install luajit
download ngx_devel_kit
# Capistrano configuration | |
# | |
# require 'new_relic/recipes' - Newrelic notification about deployment | |
# require 'capistrano/ext/multistage' - We use 2 deployment environment: staging and production. | |
# set :deploy_via, :remote_cache - fetch only latest changes during deployment | |
# set :normalize_asset_timestamps - no need to touch (date modification) every assets | |
# "deploy:web:disable" - traditional maintenance page (during DB migrations deployment) | |
# task :restart - Unicorn with preload_app should be reloaded by USR2+QUIT signals, not HUP | |
# Thanks to tenderlove on Peepcode play by play | |
require 'digest/md5' | |
def fetch username | |
records = JSON.parse get username | |
records.each do |hash| | |
checksum = Digest::MD5.hexdigest Marshal.dump(hash) | |
hash['checksum'] = checksum | |
end |
#userful gem [rack-p3p](https://github.com/hoopla/rack-p3p) | |
# [ie_iframe_cookies](https://github.com/grosser/ie_iframe_cookies) | |
# encoding: utf-8 | |
class ApplicationController < ActionController::Base | |
protect_from_forgery | |
before_filter :set_p3p | |
def set_p3p | |
headers['P3P'] = "policyref=\"/w3c/p3p.xml\", CP=\"ALL DSP COR CURa ADMa DEVa TAIa OUR BUS IND UNI COM NAV INT\"" | |
end |
# Additional translations at https://github.com/plataformatec/devise/wiki/I18n | |
zh-CN: | |
errors: | |
messages: | |
expired: "您已过期,请重新申请" | |
not_found: "没有找到" | |
already_confirmed: "已经激活,请重新登录." | |
not_locked: "未锁定" | |
not_saved: |
http://wiki.nginx.org/HttpLuaModule#Installation
install LuaJIT
$ brew install luajit
download ngx_devel_kit
module Settings | |
def self.get key | |
val = data.fetch(Rails.env, nil).try(:[], ENV["PLATFORM"]).try(:[], key) | |
raise "value nil in #{ Rails.en }" if val.nil? && Rails.env != "test" | |
val | |
end | |
def self.data | |
@data ||= YAML.load_file File.join(Rails.root, "config/settings.yml") | |
end |
PYTHONPATH=/opt/graphite/webapp/graphite | |
MODULE=graphite_uwsgi |
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.
[ "{*.yml,*.yml.default}" ] | |
fileType = source.yaml | |
[ "{Capfile,Gemfile,Gemfile.lock,Guardfile}" ] | |
fileType = source.ruby | |
[ *_spec.rb ] | |
fileType = source.ruby.rspec | |
[ "{app/{models,controllers,mailers,helpers,cells,uploaders}/**/*.rb,*_controller.rb,*_helper.rb,*_mailer.rb}" ] |