I hereby claim:
- I am tjbladez on github.
- I am tjbladez (https://keybase.io/tjbladez) on keybase.
- I have a public key whose fingerprint is 3FD2 C8A7 EBCC C45C 2BB0 3B85 CF85 A886 82EA F54C
To claim this, I am signing this object:
# to deal with array of hashes | |
module ArrayExtensions | |
def where(criteria ={}) | |
result = self | |
criteria.each do |cr_key, cr_value| | |
result = result.select do |hash| | |
hash[cr_key].to_s.match(/#{cr_value}/i) | |
end | |
end | |
result |
require 'pathname' | |
path = Pathname.new('.') # current directory | |
path += 'tests' # ./tests | |
path += 'functional' # ./tests/functional | |
path = path.parent # ./tests | |
path += 'config.yaml' # ./tests/config.yaml | |
path.read # contents of ./tests/config.yaml | |
path.open('w'){|io| io << "env: test"} | |
path.read # "env: test" | |
path.children{|p| puts p.inspect} # prints all the files/directories in ./tests |
-----Original Message----- | |
From: Nickolay Schwarz | |
Sent: Friday, November 14, 2008 4:06 PM | |
To: All Employees | |
Subject: Transis Release A.7.1 Tonight | |
Centrons are greeted. | |
Releasing more code tonight. | |
A shine into the dawn |
Namespace.models.Base = Backbone.Model.extend | |
initialize: ()-> | |
Backbone.Model::initialize @, arguments | |
return if _.isUndefined(@computed) | |
@_computed = {} | |
for attr, dependencies of @computed | |
@on "change:#{attr}", ()=> |
I hereby claim:
To claim this, I am signing this object:
## retry set | |
rs = Sidekiq::RetrySet.new | |
jobs = rs.select do |job| | |
job.klass == 'Activity::SupportReportingCacheWorker' | |
end | |
#jobs.count | |
jobs.each(&:delete) | |
## dead set | |
ds = Sidekiq::DeadSet.new |