Man accused of firing gun in the direction of ex-girlfriend