Skip to content

Instantly share code, notes, and snippets.

View jpzwarte's full-sized avatar

Jeroen Zwartepoorte jpzwarte

View GitHub Profile
<div id="grid"></div>
@jpzwarte
jpzwarte / index.html
Created June 18, 2012 12:18 — forked from fpauser/index.html
Ember.Router
<!doctype html>
<html><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js'></script>
<script type='text/javascript' src="http://cloud.github.com/downloads/wycats/handlebars.js/handlebars-1.0.0.beta.6.js"></script>
<script type='text/javascript' src="http://cloud.github.com/downloads/emberjs/ember.js/ember-latest.js"></script>
</head><body>
<script type="text/x-handlebars" data-template-name="application">
<h1>Application</h1>
<a href="#/dashboard">Dashboard</a>
@jpzwarte
jpzwarte / capybara_webkit_screenshot_env.rb
Created August 23, 2011 13:52 — forked from mattheworiordan/capybara_webkit_screenshot_env.rb
Cucumber and Capybara-Webkit automatic screenshots on failure
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?
def tip(msg); puts; puts msg; puts "-"*100; end
#
# 30 Ruby 1.9 Tips, Tricks & Features:
# http://www.igvita.com/2011/02/03/new-ruby-19-features-tips-tricks/
#
tip "Upgrading to Ruby 1.9 is simple: rvm install 1.9.2 && rvm --default 1.9.2"
tip "Ruby 1.9 supports named captures in regular expressions!"