But being realistic if you aren't able to afford to eat, then you need to find another job before you leave this one. So I'd concentrate on that, finding something else. Unfortunately you'll have to put up with this for a little while, so you could start documenting what goes on if you wish to make some legal complaint (although that might be expensive, unless you can find a lawyer who will work on a % of the potential winnings).
Nobody should have to put up with racism and abuse in the workplace, and I have no strategies for dealing with that except to get out ASAP. The only thing I would say is, try and ignore the things he doesn't which don't directly impact you (e.g. flirting with female employees, it really has zero impact on you, your work, or anything).