Skip to content

Instantly share code, notes, and snippets.

View larssmit's full-sized avatar

Lars Smit larssmit

  • Gouda, The Netherlands
View GitHub Profile
@larssmit
larssmit / compare_yaml.rb
Created November 10, 2015 07:00 — forked from joost/compare_yaml.rb
Compare two YAML files
def compare_yaml_hash(cf1, cf2, context = [])
cf1.each do |key, value|
unless cf2.key?(key)
puts "Missing key : #{key} in path #{context.join(".")}"
next
end
value2 = cf2[key]
if (value.class != value2.class)

Capybara

save_and_open_page

Matchers

have_button(locator)
@larssmit
larssmit / README.md
Created December 26, 2012 11:21 — forked from dergachev/README.md

Vagrant Setup

This tutorial guides you through creating your first Vagrant project.

We start with a generic Ubuntu VM, and use the Chef provisioning tool to:

  • install packages for vim, git
  • create user accounts, as specified in included JSON config files
  • install specified user dotfiles (.bashrc, .vimrc, etc) from a git repository

Afterwards, we'll see how easy it is to package our newly provisioned VM

@larssmit
larssmit / prettify_json.rb
Created October 20, 2012 09:50 — forked from tilo/prettify_json.rb
Ruby script to pretty print JSON on the command line (comes with Ruby's json Gem) (curl ... | prettify_json.rb)
#!/usr/bin/env ruby
require 'json'
require 'fileutils'
include FileUtils
# Parses the argument array _args_, according to the pattern _s_, to
# retrieve the single character command line options from it. If _s_ is
# 'xy:' an option '-x' without an option argument is searched, and an
# option '-y foo' with an option argument ('foo').