I hereby claim:
- I am keepcosmos on github.
- I am keepcosmos (https://keybase.io/keepcosmos) on keybase.
- I have a public key ASAwp-juGS27s8Nf-j-vii8202YtEAkRvo7j1HHEtK0UUgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| # {type}: {요약된 내용을 한 줄로 작성} | |
| # ex) fix: 공유용 여행확인증 URL에 파라미터로 포함된 access_token이 복호화되지 않는 문제 해결. | |
| # 상세 내용이나 지라 이슈코드가 있다면, 명료하고 간결하게 아래에 작성합니다. | |
| # --- COMMIT END --- | |
| # type의 종류 | |
| # feature (새로운 기능) | |
| # fix (버그 픽스) | 
| require 'amqp' | |
| module HiringThingEM | |
| def self.start | |
| if defined?(PhusionPassenger) | |
| PhusionPassenger.on_event(:starting_worker_process) do |forked| | |
| # for passenger, we need to avoid orphaned threads | |
| if forked && EM.reactor_running? | |
| EM.stop | |
| end | |
| Thread.new { | 
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.
| # MOVE TO PROJECT PATH | |
| rm -rf ~/.bundle/ ~/.gem/bundler/ ~/.gems/cache/bundler/ | |
| rm -rf $GEM_HOME/bundler/ $GEM_HOME/cache/bundler/ | |
| rm -rf .bundle/ | |
| rm -rf vendor/cache/ | 
| db.messenger_rooms.mapReduce( | |
| function(){ | |
| var date = new Date(this.created_at); | |
| date.setHours(date.getHours()); | |
| var dateKey = (date.getFullYear()+"-"+(date.getMonth()+1)+"-"+date.getDate()); | |
| var reserved_count = (this.reservation_status == undefined || this.reservation_status == null) ? 0 : 1; | |
| emit(dateKey, {count: 1, reserved_count: reserved_count}); | |
| }, | |
| function(key, values){ | |
| var sum = {count: 0, reserved_count: 0} | 
| db.messenger_rooms.group({ | |
| keyf: function(doc){ | |
| var date = new Date(doc.created_at); | |
| date.setHours(date.getHours() + 9); | |
| var dateKey = (date.getFullYear()+"-"+(date.getMonth()+1)+"-"+date.getDate()); | |
| return {'day':dateKey}; | |
| }, | |
| cond: {created_at: {$gte: ISODate("2014-04-01"), $lte: ISODate("2014-04-03")}}, | |
| initial: { count: 0, reserved_count: 0}, | |
| reduce: function(doc, aggregator){ | 
| class Calendar::GuideCalendar | |
| include Mongoid::Document | |
| field :user_id, :type => Integer | |
| has_many :event_date, :class => Calendar::EventDate | |
| # event date 기간 삽입 | |
| def insert_duration(start_date, end_date) | |
| self.insert_events(*(start_date..end_date).to_a) |