Skip to content

Instantly share code, notes, and snippets.

Avatar

John Yeates unikitty37

  • Sussex, UK
View GitHub Profile
@unikitty37
unikitty37 / pre-commit
Last active Aug 12, 2017
Git pre-commit hook to reject RSpec files with 'focus: true' in them
View pre-commit
#!/bin/sh
function check_diffs () {
FOLDER_PATTERN="$1"
FILES_PATTERN="$2"
FORBIDDEN="$3"
FORBIDDEN_PRINTABLE="${4:-$3}"
CHANGED_FILES=$(git diff --cached --name-only | egrep $FOLDER_PATTERN | egrep $FILES_PATTERN)
OK=1
for FILE in $CHANGED_FILES ; do
@unikitty37
unikitty37 / env.rb
Created Feb 13, 2012
env.rb for Cucumber
View env.rb
# IMPORTANT: This file is generated by cucumber-rails - edit at your own peril.
# It is recommended to regenerate this file in the future when you upgrade to a
# newer version of cucumber-rails. Consider adding your own code to a new file
# instead of editing this one. Cucumber will automatically load all features/**/*.rb
# files.
require 'cucumber/rails'
require 'factory_girl/step_definitions'
# Capybara defaults to XPath selectors rather than Webrat's default of CSS3. In
@unikitty37
unikitty37 / with_reset.css
Created Jan 5, 2012
CSS reset knocks out Google Fonts (compass/reset #639)
View with_reset.css
/*
*/
/* line 17, /Users/slacker/.rvm/gems/ruby-1.9.3-p0@wscamra/gems/compass-0.11.5/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
You can’t perform that action at this time.