Skip to content

Instantly share code, notes, and snippets.

View rubygeek's full-sized avatar

Nola Stowe rubygeek

View GitHub Profile
@rubygeek
rubygeek / gist:d003517468f8b26174ba
Last active August 29, 2015 14:18
Code Katas for AustinRB April 6
Make an account at http://www.codewars.com .... its an easy to use interface that makes it easy to get started and write tests.
Easy one
http://www.codewars.com/kata/square-every-digit
Little bit harder
http://www.codewars.com/kata/sum-of-digits-slash-digital-root
require 'minitest/autorun'
# Expectations: http://bfts.rubyforge.org/minitest/MiniTest/Expectations.html
# Help create test cases: http://www.cleavebooks.co.uk/scol/calnumba.htm
class Converter
end
describe Converter do
before do
(function( $ ){
$.fn.blank = function() {
return $(this).val() == ""
};
})( jQuery );
Usage
if ($("#old_password").blank()) {
console.log("old passworld is blank");
@rubygeek
rubygeek / gist:4111823
Created November 19, 2012 16:53
Simple Breadcrumb Object with Tests
class Breadcrumb
Crumb = Struct.new(:name, :link)
attr_reader :crumbs
def initialize(name = "Home", link = "/")
@crumbs = []
self.add(name, link)
end
@rubygeek
rubygeek / image_gallery.html
Created January 23, 2011 21:46
image gallery with css code