How to install and run Kibana4 on a elasticsearch tribe node

Not long ago Kibana 4 was released and I think it’s a major improvement in relation to the previos version of Kibana. Some changes worth mentioning is that Kibana 4 now runs a node js web server, Express, while Kibana3 was just plain js files that you had to serve in a httpd or nginx. This really is a great improvement! In kibana3 elasticsearch web port 9200 had to be reachable by the client, not an ideal solution as this is something you want to limit as it enables anyone to just do a curl -XDELETE. The workaround was to make a lot of proxy rewrites in the webserver serving kibana - Workable but felt more of a hack than a good solution. Running kibana server side reduces that hassle. ...

March 6, 2015 · 2 min · 413 words · Roger Welin

How to delete key from a hash in ruby

This is the first post on this blog so I will start with something short, easy and funny - namely Ruby. Known for its elegant syntax and dynamic typing working with hashes is both easy and intuitive. Let’s say you want to delete a key in a hash but you’re not sure the key exists. This is one way to do it: hash = {"Miley Cyrus" => "Annoying", "Kelly Clarkson" => "Gone"} hash.each do |k,v| if k.eql?("Kelly Clarkson") hash.delete("Kelly Clarkson") end end p hash #=> {"Miley Cyrus"=>"Annoying"} Check the ruby doc for more info and methods

March 6, 2015 · 1 min · 96 words · Roger Welin