This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fizzer = fn | |
| (0,0,_) -> "FizzBuzz" | |
| (0,_,_) -> "Fizz" | |
| (_,0,_) -> "Buzz" | |
| (_,_,n) -> n | |
| end | |
| fizzbuzz = fn(n) -> | |
| fizzer.(rem(n,3), rem(n,5), n) | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| defmodule RomanNumeral do | |
| @numerals [ | |
| {50, "L"}, | |
| {40, "XL"}, | |
| {10, "X"}, | |
| {9, "IX"}, | |
| {5, "V"}, | |
| {4, "IV"}, | |
| {1, "I"} | |
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <html> | |
| <head> | |
| <style type="text/css"> | |
| @page { size: A6; } /* Basic style for easier demonstration */ | |
| body { font-family: Verdana; } /* Basic style for easier demonstration */ | |
| .footnote { | |
| float: footnote; | |
| } | |
| </style> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Cucumber Talk - 9AM Fri - Ben Mabey - benmabey.com | |
| placing emphasis on features instead of overall product goals | |
| check wip in cucumber; can limit the number of tests to use with a given tag? | |
| Check out webrat | |
| "specify outcome, not implementation" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <%# Total number of tickets for this customer by time frame -%> | |
| <table> | |
| <thead> | |
| <tr> | |
| <th>Timeframe</th> | |
| <th>Opened</th> | |
| <th>Closed</th> | |
| </tr> | |
| </thead> | |
| <tbody> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby | |
| # this script can be used to find out what colours will look like on your terminal all in one go | |
| module TermColours | |
| @attributes = [0,1,4,5,7] | |
| @foregrounds = 30..37 | |
| @backgrounds = 40..47 | |
| def self.print_all_attribute_foreground_background_combinations | |
| @attributes.each do |attr| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| types { | |
| text/html html htm shtml; | |
| text/css css; | |
| text/xml xml; | |
| image/gif gif; | |
| image/jpeg jpeg jpg; | |
| application/x-javascript js; | |
| application/atom+xml atom; | |
| application/rss+xml rss; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby | |
| # this script can be used to find out what colours will look like on your terminal all in one go | |
| module TermColours | |
| @attributes = [0,1,4,5,7] | |
| @foregrounds = 30..37 | |
| @backgrounds = 40..47 | |
| def self.print_all_attribute_foreground_background_combinations | |
| @attributes.each do |attr| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #upload_target { | |
| display:none ! important; | |
| } | |
| div.bottom { | |
| padding:0px ! important; | |
| margin:0px ! important; | |
| background-image: none ! important; | |
| } | |
| div#last_message{ | |
| display:none ! important; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module ActiveSupport | |
| module Testing | |
| module Declarative | |
| alias :tu_test_original :test | |
| # test "verify something", [:slow, :wip] do | |
| # ... | |
| # end | |
| def test(name, tags = nil, &block) |
OlderNewer