A man was hit twice by a gunman who fired at him over a fence from a neighbour's garden, a court has heard – the 'career criminal' had been released from prison after serving for an armed raid