Settle on the type of person you want to be and stick to it, whether alone or in company.
Often credited to Marcus Aurelius. It comes from the Stoic Epictetus, whose teachings Marcus studied closely, in section 33 of the Enchiridion, his handbook for living.