Bhagavad Gita 2.57
Chapter 2: The yoga of knowledge
यः सर्वत्रानभिस्नेहस्तत्तत्प्राप्य शुभाशुभम् ।
नाभिनन्दति न द्वेष्टि तस्य प्रज्ञा प्रतिष्ठिता ॥ ५७ ॥
He who on every side is without attachments, whatever hap of fair and foul, who neither likes nor dislikes, of such a one the understanding is well poised.
Sanskrit text and English translation: Annie Besant, The Bhagavad-Gita, 4th edition (1922) — public domain, via Wikisource. Chapter summaries: SamayaVeda.