Judge resigns for making racist remarks to a class of law students