More than £5,000 has been raised for two men injured in separate attacks — one of which was a race hate crime.