HA - MySQL Master Master replication - Duplicate entry errors
This is not a hack. It is the intention of them:
Use auto_increment_increment and auto_increment_offset

http://dev.mysql.com/doc/refman/5.6/en/replication-options-master.html#sysvar_auto_increment_increment