Skip to content

Instantly share code, notes, and snippets.

View rubygeek's full-sized avatar

Nola Stowe rubygeek

View GitHub Profile
@rubygeek
rubygeek / image_gallery.html
Created January 23, 2011 21:46
image gallery with css code
@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
(function( $ ){
$.fn.blank = function() {
return $(this).val() == ""
};
})( jQuery );
Usage
if ($("#old_password").blank()) {
console.log("old passworld is blank");
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
@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
Easy:
http://www.codewars.com/kata/highest-and-lowest
Harder:
http://www.codewars.com/kata/breaking-chocolate-problem
Easy one, practice having some instance variables and creating methods
http://www.codewars.com/kata/building-blocks/train/ruby
Scrabble Scores, a little more complex
http://www.codewars.com/kata/scrabble-score
or just pick a problem :)
Code Katas:
http://www.codewars.com/kata/5467e4d82edf8bbf40000155/train/ruby
http://www.codewars.com/kata/523f5d21c841566fde000009/train/ruby
other sites:
http://exercism.io/
piglatin
https://www.codewars.com/kata/520b9d2ad5c005041100000f/train/ruby
rgb to hex
https://www.codewars.com/kata/513e08acc600c94f01000001/train/ruby