When I was starting out in my career, I had a friend that was a bit of a mentor and helped me to make fewer mistakes in my career. He gave me this one piece of advice, and it has served me well over the years.
He told me that before I sent an email, or wrote a memo, or posted something publicly, I should give it the "Washington Post test". This was back in the days of newspapers in my native Virginia. The test was this: if what I had written appeared in the Washington Post the next day, would I have a problem with that?
Today I use a modified version of the test, where I think about what my Mom or my kids would think about what I posted, or wrote. or even said. It doesn't work quite as well for speaking, but it does work for writing. If there is something you blog, or post, or write, inside of work or outside of it, stop and review it. If you have any doubt that what you wrote might make a poor impression, then don't post it.
It's simple. If you have any doubts, don't to it.
Or get it reviewed. Have a friend, your wife, your boss, or someone else look over your work before you post it. Get their opinion and revise your work.