Nearly all of us have heard the age-old axiom, "Do unto others as you would have them do unto you". Sure the words might have been a bit different, but the meaning is the same. This is the Golden Rule. There is also a Silver Rule which is the opposite: "Do not do to others as you would not have them do to you." When put together, they make a pretty good framework for living, in my opinion. For me, it's my ethical foundation.
While I chose the catholic version of the Golden Rule, that is merely because it is worded well. But this principle is as old as dirt. Basically, treat people as you wish to be treated. If you look into old philosophies and religions, you'll find it in almost all of them. Sometimes, it will be the Silver Rule instead, which is a good companion. They both rely on your thoughtful empathy of how other people may think and live.
If you live by just the Golden rule, you'll fall short because, for example, you like to sleep late and stay up late. So you party late into the night, making all kinds of noise, assuming others live like you. But your neighbors get up at dawn and go to bed very early. So in that case, the Silver Rule would be more thoughtful and helpful. It encompasses the notion of empathy in a different light than the Golden Rule.
We all know christianity claims the Golden Rule for itself, but I just wanted to highlight some other people that came up with this idea before Jesus was causing trouble in the Middle East.
The Ancient Greeks held these rules as common principles:
"Do not to your neighbor what you would take ill from him." – Pittacus
"Avoid doing what you would blame others for doing." – Thales
"What you wish your neighbors to be to you, such be also to them." – Sextus the Pythagorean
"Do not do to others what would anger you if done to you by others." – Isocrates
"What thou avoidest suffering thyself seek not to impose on others." – Epictetus
"It is impossible to live a pleasant life without living wisely and well and justly (agreeing 'neither to harm nor be harmed'), and it is impossible to live wisely and well and justly without living a pleasant life." – Epicurus
Confucianism also held this idea:
Never impose on others what you would not choose for yourself. Confucius, Analects XV.24
And Taoism as well:
"The sage has no interest of his own, but takes the interests of the people as his own. He is kind to the kind; he is also kind to the unkind: for Virtue is kind. He is faithful to the faithful; he is also faithful to the unfaithful: for Virtue is faithful.” Chapter 49, Tao Teh Ching
“Regard your neighbor's gain as your own gain, and your neighbor's loss as your own loss." T'ai Shang Kan Ying P'ien
The only real criticism of these two rules is how do you know how others want to be treated? You don't. I've been married for over 12 years and sometimes I still have no idea what my husband is thinking. That's no excuse though. Because if you fall back on the philosophy that you can never know what another person is thinking or what they might want for themselves, you'll become quickly overwhelmed and then you'll do nothing.
In the case of my husband, I can just ask him what he would like in any given situation. I'll still make mistakes and screw up at times, but if I try to do my best, if I'm thoughtful and empathetic, then I consider that pretty damned good. In other situations, you can't ask someone what they would prefer, or it would be inappropriate to do so for whatever reason. So make an educated guess. Even if it's wrong, you're coming from a good place and doing your best. It's better than doing nothing and wallowing in existential philosophy and nihilism.