Archive for March, 2010

Ant on Ubuntu 9.10

March 20th, 2010 No comments

Problem installing Ant under Ubuntu Karmic Koala (9.10): apt insists on installing gcj even if Sun JRE is already present.
Workaround for karmic, for those unfamiliar with apt. In the console, type:

sudo apt-get install ant ant-gcj- ant-optional-gcj- gcj-4.4-base- libgcj-common-

Categories: Uncategorized Tags:

Ruby ‘dups’

March 7th, 2010 No comments

I was surprised to see Ruby doesn’t have this handy function:

module Enumerable
def dups
inject({}) {|h,v| h[v]=h[v].to_i+1; h}.reject{|k,v| v==1}.keys

Categories: Uncategorized Tags: