I've only used code snippets in VS Code which can store them in user settings for synchronization. They can also e stored in project settings, which can be optionally synchronized via source control.
I tend not to need them in larger projects where a lot of codegen is available or macros, so I haven't thought about a solution for things like VS or manual syncing.
I keep different identities for different purposes. This identity is pretty public and active on social media, but mostly in the developer and anime sphere. This is partially born out of a desire to find other people to connect with on those topics, which makes it a worthy trade-off in my view. I also don't mind sharing what I've posted since most won't bother to look closely, and even if they do, there's not too much to find other than my interests and past projects.
Other identities serve other interests or are much more personal, so those things aren't as closely in the public eye. My more divisive or controversial takes are really only shared with trusted friends and generally not in writing though, so I might not fit the question you're posting very well, haha