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
require 'rspec' | |
class Fixnum | |
ROMANS = { M: 1000, CM: 900, D: 500, CD: 400, C: 100, XC: 90, L: 50, XL: 40, X: 10, IX: 9, V: 5, IV: 4, I: 1 } | |
def to_roman | |
remaining_number = self | |
ROMANS.inject ("") do | roman_str, current_number | | |
times,remaining_number = remaining_number.divmod current_number[1] | |
roman_str + current_number[0].to_s * times |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" | |
"http://www.w3.org/TR/html4/loose.dtd"> | |
<html lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<title>untitled</title> | |
<meta name="generator" content="TextMate http://macromates.com/"> | |
<meta name="author" content="Abel Muiño Vizcaino"> | |
<!-- Date: 2011-02-14 --> |
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
/* Texto elevado */ | |
.elevado { | |
color: white; | |
text-shadow: 0 1px 4px rgba(0, 0, 0, 0.68); | |
} | |
/* Texto hundido (grabado) */ | |
.hundido { | |
color: #243748; | |
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.33); |
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
# It is 00:15 | |
ruby-1.9.2-p180 :025 > Time.now | |
=> 2011-03-31 00:15:10 +0200 | |
# Today is 31st of March | |
ruby-1.9.2-p180 :023 > Date.today | |
=> Thu, 31 Mar 2011 | |
# Yesterday was 29 of March ????? WTF!!! | |
ruby-1.9.2-p180 :024 > Date.yesterday |
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
http://alltogether.es/category/proyectos/pymeprivee-proyectos/ |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<title>untitled</title> | |
<meta name="generator" content="TextMate http://macromates.com/"> | |
<meta name="author" content="Abel Muiño Vizcaino"> | |
<style type="text/css" media="screen"> | |
body { |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<title>untitled</title> | |
<meta name="generator" content="TextMate http://macromates.com/"> | |
<meta name="author" content="Abel Muiño Vizcaino"> | |
<style> | |
body { |
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
int numberOfThingsThatAreSorted = getCustomComparatorNumberOfKnownThingsForSorting(); | |
int numberOfActualThings = getAllThings().size(); | |
if (numberOfThingsThatAreSorted < numberOfActualThings) | |
throw new IllegalStateException( | |
"An implementation of ThisClass (whose abstract subclasses are ThatOtherClass and YetAnotherClass) " | |
+ "must ensure that all the Things it specifies are also passed in for custom sorting. Instead found only " | |
+ numberOfThingsThatAreSorted | |
+ " Things to be sorted, as implemented by getCustomComparatorNumberOfKnownThingsForSorting, but " | |
+ numberOfActualThings + " actual Things."); |
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
rails c test | |
ActiveRecord::Base.logger.level = Logger::WARN | |
require 'rspec' | |
reload! ; RSpec::Core::Runner.run ["spec"] | |
reload! ; RSpec::Core::Runner.run ["spec"] | |
reload! ; RSpec::Core::Runner.run ["spec"] | |
reload! ; RSpec::Core::Runner.run ["spec"] | |
reload! ; RSpec::Core::Runner.run ["spec"] | |
reload! ; RSpec::Core::Runner.run ["spec"] |
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
Request timeout for icmp_seq 219 | |
Request timeout for icmp_seq 220 | |
Request timeout for icmp_seq 221 | |
Request timeout for icmp_seq 222 | |
Request timeout for icmp_seq 223 | |
Request timeout for icmp_seq 224 | |
Request timeout for icmp_seq 225 | |
Request timeout for icmp_seq 226 | |
Request timeout for icmp_seq 227 | |
Request timeout for icmp_seq 228 |