All content contributed by users on Stack Exchange is licensed under CC BY-SA 3.0. Under this license, complete attribution requires that you include the following:
- The copyright notice for the work [CC BY-SA 3.0 § 4(c)]
- The URI of the license [CC BY-SA 3.0 § 4(a)]
- The original author's display name [CC BY-SA 3.0 § 4(c)(i)]
- The title of the work [CC BY-SA 3.0 § 4(c)(ii)]
- The URI of the work [CC BY-SA 3.0 § 4(c)(iii)]
And, obviously, if you've made any changes (remix/adapt), then you must clearly indicate those, making it clear that they were not the original words of the author.
So, a complete citation would look something like:
According to Gilles in an answer to "How to properly cite someone on Stack Exchange?":
"it's rather unprofessional to levy accusations at people when you don't have all the facts and there were rather big clues that you apparently didn't try to understand"
(Licensed under CC BY-SA 3.0.)
Or, in print medium, perhaps something like:
Gilles. Answer to "How to properly cite someone on Stack Exchange?", Meta Stack Exchange. 13 April, 2019. <https://meta.stackexchange.com/a/326765>.
(Licensed under CC BY-SA 3.0: <https://creativecommons.org/licenses/by-sa/3.0/>)
The copyright notice can be omitted when you're citing this on other Stack Exchange sites, since that copyright notice is already provided on every page.