In everyday speech, a golden rule is simply something which should be remembered, for example "the golden rule of beer drinking is to stop while you can still remember where you live"; "the golden rule of using computers is to save your work often".
Here is a short list of statements of the golden rule, in chronological order:
900-500 BCE "Do not seek revenge or bear a grudge against one of your people, but love your neighbor as yourself." - Bible, The New International Version, Leviticus 19:18, Judaism.
700 BCE "That nature only is good when it shall not do unto another whatever is not good for its own self." - Dadistan-i-Dinik 94:5, Zoroastrianism.
? BCE "Whatever is disagreeable to yourself do not do unto others." - Shayast-na-Shayast 13:29, Zoroastrianism.
500 BCE "Hurt not others in ways that you yourself would find hurtful." - Udana-Varga 5:18, Buddhism.
~500 BCE "What you do not want done to yourself, do not do to others." Analects of Confucius 15:24, Confucianism, tr. James Legge.[1]
~500 BCE "Now the man of perfect virtue, wishing to be established himself, seeks also to establish others; wishing to be enlarged himself, he seeks also to enlarge others. To be able to judge of others by what is nigh in ourselves;– this may be called the art of virtue." Analects of Confucius 6:30, Confucianism, tr. James Legge. [1]
~500 BCE "one word that can serve as a principle of conduct for life [is] reciprocity. Do not impose on others what you yourself do not desire." - Doctrine of the Mean 13.3, Confucianism.
500 BCE "Therefore, neither does he [, a sage,] cause violence to others nor does he make others do so." - Acarangasutra 5.101-2, Jainism.
400 BCE "Do not do to others what would anger you if done to you by others." - Socrates.
150s BCE "This is the sum of duty: Do naught unto others which would cause you pain if done to you." - Mahabharata 5:1517, Brahmanism and Hinduism.
58 CE "Do to others as you would have them do to you." - Bible, The New International Version, Luke 6:31, Christianity.
90 CE "What you would avoid suffering yourself, seek not to impose on others." - Epictetus.
100 CE "What is hateful to you, do not to your fellow man. This is the law: all the rest is commentary." - Talmud, Shabbat 31a, Judaism.
800 CE "No one of you is a believer until he desires for his brother that which he desires for himself." - Hadith ?, Islam.
? CE "And if thine eyes be turned towards justice, choose thou for thy neighbour that which thou choosest for thyself." - Epistle to the Son of the Wolf, 30, Bahá'í.
1870 CE "He should not wish for others what he does not wish for himself." - Baha'u'llah, Bahá'í.
1999 CE "don't do things you wouldn't want to have done to you." - British Humanist society, Humanism.
Note that the positive Confucianist, Christian, Muslim, and Bahá'í versions differ from the negative rules in that they call for interactions rather than leaving others alone. This distinction is described in the moral fantasy The Water Babies by Charles Kingsley as the difference between the lovely Mrs Do-as-you-would-be-done-by and her fearsome sister Mrs Be-done-by-as-you-did.
A somewhat similar basis for ethic behaviour is often found also in other ethical systems as, for instance, in Immanuel Kant's Critique of Practical Reason: "The rule of the judgement according to laws of pure practical reason is this: ask yourself whether, if the action you propose were to take place by a law of the system of nature of which you were yourself a part, you could regard it as possible by your own will. (...) If the maxim of the action is not such as to stand the test of the form of a universal law of nature, then it is morally impossible" (trans. T.K. Abbott). This is known as the categorical imperative.
See also: Wiccan Rede, Meta-Golden RuleExamples