Skip to content

Instantly share code, notes, and snippets.

View capybara_webkit_screenshot_env.rb
def screen_shot_and_save_page
require 'capybara/util/save_and_open_page'
path = "/#{Time.now.strftime('%Y-%m-%d-%H-%M-%S')}"
Capybara.save_page body, "#{path}.html"
page.driver.render Rails.root.join "#{Capybara.save_and_open_page_path}" "#{path}.png"
end
begin
After do |scenario|
screen_shot_and_save_page if scenario.failed?
View gist:8538526

Sublime Text 2 – Useful Shortcuts (PC)

Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.

Editing

Ctrl+C copy current line (if no selection)
Ctrl+X cut current line (if no selection)
Ctrl+⇧+K delete line
Ctrl+ insert line after
View keybase.md

Keybase proof

I hereby claim:

  • I am edejong on github.
  • I am erikdejong (https://keybase.io/erikdejong) on keybase.
  • I have a public key ASD3LlwswRDd-pqQmtXdm4el1iDnAZQ9tNcb-FuKzliELQo

To claim this, I am signing this object: