Skip to content

Instantly share code, notes, and snippets.

Capybara

save_and_open_page

Matchers

have_button(locator)
A good commit message looks like this:
Header line: explaining the commit in one line
Body of commit message is a few lines of text, explaining things
in more detail, possibly giving some background about the issue
being fixed, etc etc.
The body of the commit message can be several paragraphs, and
please do proper word-wrap and keep columns shorter than about
@gavingmiller
gavingmiller / hack.sh
Created March 31, 2012 14:19 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2265392/hack.sh | sh
#
@gavingmiller
gavingmiller / gist:1271793
Created October 8, 2011 03:10 — forked from javan/gist:1168475
Fix iPhone home button
Found this tip in comment here: http://www.tipb.com/2011/01/04/tipb-bug-home-button-working-iphone/
1.) Open any application
2.) Press and hold the power button until the slide to shutdown swipe bar appears.
3.) Release Power button
4.) Press and hold Home button Lightly
until screen returns to icon screen
//
// NSDate+Surrounding.h
//
// Created by Josh Kendall on 12/22/10.
// Copyright 2010 JoshuaKendall.com. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface NSDate (Surrounding)