* Do meaningful work, whatever that means to you. Maybe it's picking a domain that helps people or society, or maybe it's some other criterion. Ask yourself what meaningful work is to you.
* Be mindful about your craftsmanship and always work to improve it. Try to write solid, expressive, readable code that works, and be critical about your own code. Read other people's code closely and see what you can learn from it. Explore new technologies, not just for "variety" but for what you can learn from what led to their development and how they were implemented.
* Engage in mentorship of younger developers. Mentorship can really do a lot to renew your love of coding. If your employer doesn't have an established mentorship program try to help set one up. If that doesn't work, there are coding bootcamps that will let you work as little as an hour a week mentoring new developers as a consultant.
* Try to be that person within your organization that others want to come to with their thorny technical problems. Listen deeply and respond compassionately.
* Work on side projects. They don't have to change the world or "go somewhere". A side project can remind you why you love programming when the daily becomes a grind.