OpenSSL Heartbeat/Heartbleed

There’s no way that for over a year no one have exploited it.

I don’t want to judge the developer (although he has doctor title), but this is basic rule when dealing with user submitted data – never trust them. So especially in such sensitive software…

Simply explained

OpenSSL Heartbeat (Heartbleed) Vulnerability (CVE-2014-0160) and its High-Level Mechanics from Elastica Inc on Vimeo.

Share Button

Coolest JS quirk utilisation I’ve recently seen

Check out JS multiline strings:

Do you wander how it’s done? Open your JS console (Chrome: ctrl+shift+i) and type:

f = function(){/* my multiline 
string */}
(f + "").substring(14).slice(0, -3)

and you’ll get

" my multiline 
string "

This is really creative. +1

Share Button

Rybymine 6.0 EAP Momiji + Zeus + Test::Unit (SimpleTest)

The thing I really needed was server like Spork DRb or Zeus. I’ve tried with Spork at first and failed, but then Momiji appeared, and I gave it one more shot. I was hoping that Zeus is better and less configuration is needed… and it’s true, but it’s not very friendly with Test::Unit.

But with just few tweaks it’s fast to switch to MiniTest.


-  gem 'test-unit'
Add a comment to this line
+  gem 'minitest'
+  gem 'minitest-reporters'
+  gem 'zeus'

test_helper.rb (I was using Test::Unit assert_false – apparently it’s not included in MiniTest, deprecate means: I’ll fix it some day):

+require 'minitest/reporters'
+module MiniTest::Assertions
+  include ActiveSupport::Deprecation
+  alias_method :assert_false, :refute
+  deprecate :assert_false => 'monkeypatch to use Mintest suite, use refute instead of assert_false'

So now running single test takes less than a second (except first run, when Zeus seems to warm up). I don’t waste around 10-15 seconds for env to initialize (every time!).

For some reason all rake tests (ctrl+alt+r -> test) are not going through zeus, maybe it’ll be fixed before RubyMine 6.0 release

Share Button