I hereby claim:
- I am miharekar on github.
- I am mrfoto (https://keybase.io/mrfoto) on keybase.
- I have a public key whose fingerprint is D554 3AEF FF43 7A2A 6D51 221B A0F8 0CAC 143F EC5D
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
More info in the blog post.
| require 'benchmark/ips' | |
| class Foo | |
| attr_reader :test | |
| def initialize(test) | |
| @test = test | |
| end | |
| def read |
I hereby claim:
To claim this, I am signing this object:
| # Is there a better way to do this? I have User model | |
| Neo4j::Session.query | |
| .match('()-[n:FOLLOWS]->(u)') | |
| .with('u, COUNT(n) AS c') | |
| .return('u, c') | |
| .order('c DESC') | |
| .where('c > 2').to_a | |
| # Additionaly I want to remove some users %w(mrfoto mfilej otobrglez) for example | |
| # I came up with this but I'm wondering if there's a better way? |
| require 'benchmark/ips' | |
| Benchmark.ips do |x| | |
| class SingleFilterClass | |
| def initialize(method, values) | |
| @method = method | |
| @values = values | |
| end | |
| def call_flatten(value) |
| require 'benchmark/ips' | |
| Benchmark.ips do |x| | |
| SingleFilterStruct = Struct.new(:method, :values) do | |
| def call(value) | |
| Array(value).any? { |v| v.send(method, *values) } | |
| end | |
| end | |
| class SingleFilterClass |
| require 'nokogiri' | |
| require 'open-uri' | |
| require 'json' | |
| require 'csv' | |
| URL = 'http://apparatus.si/oddaja/pogovor/page/%d/' | |
| def last_page | |
| doc = Nokogiri::HTML(open(URL%1)) | |
| pagination = doc.css('.archive-pagination a') |
| /Users/mrfoto/.rubies/ruby-2.0.0-p247/bin/ruby -r ./siteconf20140924-20429-1pmwjcu.rb extconf.rb | |
| Ruby platform=x86_64-darwin14.0.0 | |
| rbsigar_generated.rx needs update | |
| generating rbsigar_generated.rx | |
| fatal: Not a git repository (or any of the parent directories): .git | |
| ../../src/sigar.c -> sigar.c | |
| ../../src/sigar_cache.c -> sigar_cache.c | |
| ../../src/sigar_fileinfo.c -> sigar_fileinfo.c | |
| ../../src/sigar_format.c -> sigar_format.c | |
| ../../src/sigar_getline.c -> sigar_getline.c |
| [user] | |
| name = Miha Rekar | |
| email = [email protected] | |
| [core] | |
| editor = atom -nw | |
| [color] | |
| ui = 1 | |
| [alias] | |
| s = status -sb | |
| c = commit |