| ⌘T | go to file |
| ⌘⌃P | go to project |
| ⌘R | go to methods |
| ⌃G | go to line |
| ⌘KB | toggle side bar |
| ⌘⇧P | command prompt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Animal | |
| class << self | |
| def query | |
| where(name: "cat") | |
| end | |
| def query_as_array | |
| criteria = send("query_as_criteria") | |
| criteria.count == 0 ? nil : criteria.to_a | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module Actions | |
| module Base | |
| def email(args) | |
| extend(Mail) | |
| send(*args) | |
| end | |
| def statistics(m,*args) | |
| extend(Statistics) | |
| send(m,*args) | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module Actions | |
| module Base | |
| def email(args) | |
| extend(Mail) | |
| send(*args) | |
| end | |
| def statistics(m,*args) | |
| extend(Statistics) | |
| send(m,*args) | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class EventHandler | |
| def initialize | |
| @callbacks = Hash.new { |h,k| h[k] = [] } | |
| end | |
| def on(event, callback) | |
| @callbacks[event] << callback | |
| end | |
| def trigger(event, *args) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 2012-08-28T19:13:01Z 25218 TID-117y84 SecondaryTestProcessor MSG-zeneo INFO: start | |
| 2012-08-28T19:13:11Z 25218 TID-117y84 WARN: {"retry"=>true, "queue"=>"critical", "backtrace"=>40, "class"=>"SecondaryTestProcessor", "args"=>["503d1443da756c61fa000125"], "jid"=>"2eak6j7a1Kp/C4N47hEZBg=="} | |
| 2012-08-28T19:13:11Z 25218 TID-117y84 WARN: No transition found for event sent_for_work | |
| 2012-08-28T19:13:11Z 25218 TID-117y84 WARN: /usr/local/rvm/gems/ruby-1.9.3-p194/bundler/gems/stateflow-1e526266a2b1/lib/stateflow/event.rb:15:in `fire' | |
| /usr/local/rvm/gems/ruby-1.9.3-p194/bundler/gems/stateflow-1e526266a2b1/lib/stateflow.rb:73:in `fire_event' | |
| /usr/local/rvm/gems/ruby-1.9.3-p194/bundler/gems/stateflow-1e526266a2b1/lib/stateflow.rb:43:in `block (2 levels) in stateflow' | |
| /home/deploy/application/releases/20120828110620/app/models/document.rb:295:in `send_secondary_pages' | |
| /home/deploy/application/releases/20120828110620/app/workers/secondary_test_processor.rb:13:in `block in perform' | |
| /usr/local/rvm/gems/ruby-1.9.3-p194/bundler/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def call(worker, msg, queue) | |
| begin | |
| if msg['retry_count'] && msg['retry_count'] >= @max_retries | |
| ..... | |
| ..... | |
| else | |
| yield | |
| end | |
| rescue => e | |
| raise |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Phase I | |
| First PDF is uploaded and it is sent to Sidekiq. | |
| If Sidekiq dies and it remains in the Q Backlog infinitely, what do we do? | |
| App precodes: rotates, crops, creates decodings | |
| Failures here are retried thrice, if no success, send email to us and SureWire | |
| Do this yourself / App Error has occurred | |
| Tests are scanned for integrity | |
| Emails are sent for no tests, incomplete test set, unidentified pages and processable pages |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package recfun | |
| import common._ | |
| object Main { | |
| def main(args: Array[String]) { | |
| println("Pascal's Triangle") | |
| for (row <- 0 to 10) { | |
| for (col <- 0 to row) | |
| print(pascal(col, row) + " ") | |
| println() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [email protected], | |
| [email protected], | |
| [email protected], | |
| [email protected], | |
| [email protected], | |
| [email protected], | |
| [email protected], | |
| [email protected], | |
| [email protected], | |
| [email protected], |
OlderNewer