quick and dirty port of replicode to linux