Posts about technology

Updating Google Chrome on MacOSX is broken!

24 January 2015

Or am i the only one who could never, ever, update Google Chrome through the "About" box?

Everytime i press "Update" here:

I get this:

Anyone knows if there a solution to this?

Count (group by) number of line occurrences in file

24 January 2015

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, key| hash[key] = 0} list.each {|item| h[item] += 1} h = h.sort_by { |k,v| v }.reverse h.each_with_index do |p,i| puts "(#{p[1]}) #{p[0]}" if ARGV[1] and ARGV[1].to_i <= i + 1 break end end Usage is: ruby count.rb <file> [show_at_most_n] If you have a file named "faren.txt" comprised of the following lines: test test awesome du...

New version of the red hot chili peppers lyrics generator

24 January 2015

This time i decided to make available online, here.

Have fun :D

Displaying posts 4 - 6 of 52 in total