Skip to content

Instantly share code, notes, and snippets.

> geometry
{"type"=>"MultiPolygon", "coordinates"=>[[[[24.29237451045697, 55.295095004581185], [24.29237451045697, 55.29509525603828], [24.292374845733093, 55.29509886025665], [24.292374845733093, 55.29509886025665], [24.292397895966808, 55.295085533030615], [24.292422790219213, 55.29506717666268], [24.29244726537646, 55.295040522210606], [24.292463190992475, 55.295007665150194], [24.29247945188462, 55.294973215528174], [24.292497389157397, 55.29493708952552], [24.292519265924664, 55.294897275485475], [24.29254164560612, 55.29485670707415], [24.292564863477892, 55.29481647393895], [24.292588500444825, 55.29477632462278], [24.292610461031124, 55.294737432592086], [24.292632756893546, 55.29469929493268], [24.292655220394035, 55.29466266601583], [24.292673660581002, 55.29462586946093], [24.29269302277732, 55.29458722888733], [24.29271079241203, 55.29454657665697], [24.292731411893826, 55.294503828950816], [24.29275286956593, 55.294458231397584], [24.29277726090415, 55.29441330439661], [24.29280005968076, 55.2943
@stenver
stenver / Selenium_chrome_workaround.rb
Last active March 30, 2016 12:02
Selenium chrome timeout workaround
def connect(retry_count = 0)
# Selenium sometimes loses commands. This can cause a situation when browser is ready and waiting
# while at the same time test is waiting for response from the browser. Eventually the test times out
# This issue is confirmed on Chrome
Timeout::timeout(5) do
# Start the browser on a safe page.
visit_blank_page
@session_start_time ||= Time.now
end
rescue Timeout::Error
Error forwarding the new session Error forwarding the request Read timed out (org.openqa.grid.common.exception.GridException)
[remote server] org.openqa.grid.web.servlet.handler.RequestHandler(RequestHandler.java):115:in `process'
[remote server] org.openqa.grid.web.servlet.DriverServlet(DriverServlet.java):83:in `process'
[remote server] org.openqa.grid.web.servlet.DriverServlet(DriverServlet.java):67:in `doPost'
[remote server] javax.servlet.http.HttpServlet(HttpServlet.java):707:in `service'
[remote server] javax.servlet.http.HttpServlet(HttpServlet.java):790:in `service'
[remote server] org.seleniumhq.jetty9.servlet.ServletHolder(ServletHolder.java):808:in `handle'
[remote server] org.seleniumhq.jetty9.servlet.ServletHandler(ServletHandler.java):587:in `doHandle'
[remote server] org.seleniumhq.jetty9.server.session.SessionHandler(SessionHandler.java):221:in `doHandle'
[remote server] org.seleniumhq.jetty9.server.handler.ContextHandler(ContextHandler.java):1127:in `doHandle'
@stenver
stenver / gist:337aea741fe7d70ce703
Created September 9, 2014 17:01
How to set up windows machine for selenium and jenkins
# Setting up internet explorer machine with selenium
Download the machine with appropriate windows and IE from microsoft
https://www.modern.ie/en-us/virtualization-tools
Boot it up with GUI
Disable UAC and firewall - its an isolated machine that noone will access anyway(and if they do, theres really nothing there), so why bother
# Copssh
@stenver
stenver / gist:de525f67f54d91c49c49
Created August 15, 2014 08:14
Simple bash service
start on runlevel [2345]
stop on runlevel [016]
respawn
respawn limit 10 10
kill signal INT
kill timeout 20
normal exit 0 TERM INT
syntax enable " Turn on syntax highlighting.
" pathogen.vim
runtime macros/matchit.vim " Load the matchit plugin.
set showcmd " Display incomplete commands.
set showmode " Display the mode you're in.
set backspace=indent,eol,start " Intuitive backspacing.