There's a prominent developer in a community I follow who recently found his company to fold, and posted that he was looking on his blog. At the time, I was pitching for a project; I set aside a place for him and had I won the project, would have contacted him asking if he wanted the job.
In another case, someone's failure became a blog post, which I shared with management of my then employer, who authorized me to get in touch and offer the person a no-questions-asked job (she didn't take it).
I wouldn't advise this, seems like a terrible idea that could put you on side-projects/unimportant stuff in your current work or that could even get you fired, depending on your country.
I don't think any boss that notices the "I don't like my work/I am looking to leave" would be happy
Yes my thoughts too. Unless you are a contractor who is not getting renewed or the boss already knows you are leaving for some unchangeable reason (change of location for example).