10 years ago
Red Hot Chili Peppers lyrics generator
Here's a little something i tried yesterday: a ruby script that mixes and matches verbs, nouns, adjectives, and colors to come up with crazy ass lyrics, red hot style. Enjoy :)
$nouns = IO.readlines('names.txt') $adjectives =...
10 years ago
Count (group by) number of line occurrences in file
Here's a neat ruby script to group and count the number of occurrences of lines inside a given file.
count.rb list = IO.readlines(ARGV[0]) h = Hash.new {|hash, key| hash[key] = 0} list.each {|item| h[item] += 1} h = h.sort_by { |k,v| v }.reverse...
10 years ago
New version of the red hot chili peppers lyrics generator
This time i decided to make available online, here.
Have fun :D