This file contains 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 'open-uri' | |
require 'nokogiri' | |
require 'mechanize' | |
def ffffound_pages(number) | |
pg_counter = 0 | |
while pg_counter < 25*number |
This file contains 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
# grab console args | |
arg = ARGV[0].to_i | |
# instantiate counters | |
outer_counter=0; inner_counter = 0; overall_counter = 1 | |
# instantiate row string | |
row_str = "" | |
while outer_counter < arg | |
while inner_counter <= outer_counter | |
row_str << overall_counter.to_s + " " |
This file contains 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
def convert(digit) | |
result = "" | |
remainder = digit | |
while remainder > 0 | |
case remainder | |
when remainder <= 1000 | |
result << "M" | |
remainder = remainder - 1000 | |
when 900..999 |