LONDON -– There's a lesson here: If you decide to go up against J.K. Rowling on Twitter, you will almost certainly lose.

As well as being generally hilarious, the Harry Potter author –- who turns 50 Friday -– has shown time and time again that she's not afraid to put her opinions across, take down trolls and even go after powerful media moguls on the social network.

From blunt jokes to no-nonsense burns, here are some of her best moments in Twitter badassery.

1. The time she straightened out this rumour in the most British way possible.

.@anuananyas I never wrote it, never announced it & never had it edited out, so it's basically what we British call 'a load of cobblers.' — J.K. Rowling (@jk_rowling) April 13, 2015

2. This response to a Mail story about her.

There's a story in today’s Mail that I was in a London bar on Monday ‘celebrating’ handing in a ‘romantic novel’ to my publishers... — J.K. Rowling (@jk_rowling) October 22, 2014

1) I haven’t handed in ANY kind of novel to my publishers. I’m only half way through my current book. 2) It isn't a ‘romantic’ novel. — J.K. Rowling (@jk_rowling) October 22, 2014

And 3) (brace yourselves) I sometimes have a drink even when I haven’t finished a book. Yes, that’s how rock and roll I really am. — J.K. Rowling (@jk_rowling) October 22, 2014

3. Her curt response to this tweeter, who didn't like the way she was voting in the Scottish referendum.

.@aboymadeofsky No, Jonathan, I've never made a single decision in my life on the basis of whether it was cool. — J.K. Rowling (@jk_rowling) September 9, 2014

4. The time she stuck up for Madonna...

Are you the sort of person who gloats when they see a woman fall, or the kind that celebrates a magnificent recovery? #TeamMadonna — J.K. Rowling (@jk_rowling) February 27, 2015

5. ...and for Mhairi Black.

.@eric144144 U don't have to agree with all of her politics to be impressed by her oratory and authenticity. Definitely no joke candidate. — J.K. Rowling (@jk_rowling) July 16, 2015

6. Not to mention her wonderfully blunt take-down of this Serena Williams critic.

.@diegtristan8 "she is built like a man". Yeah, my husband looks just like this in a dress. You're an idiot. pic.twitter.com/BCvT10MYkI — J.K. Rowling (@jk_rowling) July 11, 2015

7. The time she silenced one Tweeter with this epic burn.

.@sjosiah0 The Internet doesn’t just offer opportunities for misogynistic abuse, you know. Penis enlargers can also be bought discreetly. — J.K. Rowling (@jk_rowling) May 8, 2015

8. And this burn.

.@teuchtermac has realised I'm about to break the record for longest period on Twitter without saying 'moron' & clearly wants to scupper me. — J.K. Rowling (@jk_rowling) June 18, 2015

9. Also this Slytherin-themed burn.

.@ChrisDarroch2 Chris, if you're this angry in victory, you must really need a hug. — J.K. Rowling (@jk_rowling) May 8, 2015

10. The time she got really angry with her printer.

Of all devices known to humankind, the desktop printer is the most evil. I am close to breaking point. — J.K. Rowling (@jk_rowling) April 27, 2015

.@BohdiByles "Breaking pnt mentally, or u're literally going to break the stupid thing?" Already broken 1 this year. This is my husband's. — J.K. Rowling (@jk_rowling) April 27, 2015

I now feel the need to say (in case he sees this at work) 'Neil, I haven't broken your printer.' — J.K. Rowling (@jk_rowling) April 27, 2015

.@Rglass2017 'was the other one you broke his?' No, mine. It threw tantrums every time I asked it to print anything longer than a pamphlet. — J.K. Rowling (@jk_rowling) April 27, 2015

.@Rglass2017 Then it had a breakdown and then I *may* have hit it very hard with my fist, since when it appears to have been comatose. — J.K. Rowling (@jk_rowling) April 27, 2015

@PhelpsieSarah @Rglass2017 You'd think seeing its unresponsive cousin lying feet away from it would give the bastard pause for thought. — J.K. Rowling (@jk_rowling) April 27, 2015

11. The time she took on the Westboro Baptist Church...

.@WBCsigns Alas, the sheer awesomeness of such a union in such a place would blow your tiny bigoted minds out of your thick sloping skulls. — J.K. Rowling (@jk_rowling) May 26, 2015

12. ...and the time she shut down Rupert Murdoch.

Maybe most Moslems peaceful, but until they recognize and destroy their growing jihadist cancer they must be held responsible. — Rupert Murdoch (@rupertmurdoch) January 10, 2015

I was born Christian. If that makes Rupert Murdoch my responsibility, I'll auto-excommunicate. http://t.co/Atw1wNk8UX — J.K. Rowling (@jk_rowling) January 11, 2015

13. Her no-nonsense attitude to tea.

.@gazing_venus Lancashire tea. I'm drinking it right now. — J.K. Rowling (@jk_rowling) February 6, 2015

.@Tucker12456 They're only tea bags. Let it go. — J.K. Rowling (@jk_rowling) February 7, 2015

14. The time she was in no way ashamed to reveal her love of Minecraft.

.@q_uibbler I have an 11 year old son - of course I play Minecraft. — J.K. Rowling (@jk_rowling) January 19, 2015

15. The time she started bantering with herself.

Just finished 3rd Cormoran Strike novel. — Robert Galbraith (@RGalbraith) April 24, 2015

.@jk_rowling Typing title page now. Signed book for first person to correctly identify which band had song of same name. — Robert Galbraith (@RGalbraith) April 24, 2015

.@jk_rowling Responses to me, not you. — Robert Galbraith (@RGalbraith) April 24, 2015

.@jk_rowling Yes, but then, I'm younger than you. — Robert Galbraith (@RGalbraith) April 24, 2015

16. Her quick response to this tweet from comedian Ross Noble.

A friend of mine sent me this photo of when I was in slitherin house at Hogwarts pic.twitter.com/dUz43SVO0z — Ross Noble (@realrossnoble) November 27, 2014

.@realrossnoble Classic case of a Hufflepuff trying to be edgy. Be who you really are, Ross. — J.K. Rowling (@jk_rowling) November 27, 2014

17. Her response to this shouty question.

.@Potterhead_Lily IT'S STUFF I HAD LYING AROUND MY OFFICE, PUT ON MY BATHROOM FLOOR AND PHOTOGRAPHED, GIRL! — J.K. Rowling (@jk_rowling) December 10, 2014

.@ardit_haliti @Potterhead_Lily Because there were things on the desk that would blow your MIND if I photographed them. — J.K. Rowling (@jk_rowling) December 10, 2014

18. The time she absolutely nailed her use of hashtags.

19. Her no-nonsense reply to the fan who tweeted, "I wonder why you said that Dumbledore is gay because I can't see him in that way."

.@anakocovic21 Maybe because gay people just look like... people? — J.K. Rowling (@jk_rowling) March 24, 2015

20. The time she discussed Harry Potter's kids' names.

@jk_rowling hey. why didn't harry name any of his kids 'elvendork'? — aillah (@THRANDUlLlEN) July 17, 2015

I was saving the name in case I had a fourth child. https://t.co/ToMUOwrYm0 — J.K. Rowling (@jk_rowling) July 17, 2015

21. Her response when someone brought up Uncle Vernon in an argument about TV license fees.

@ArtyBagger @jk_rowling Why do otherwise sensible people believe it's moral to force Uncle Vernon to pay for television he doesn't watch? — Hannah Hedgehog (@HannahHedgehog) July 17, 2015

Uncle Vernon absolutely loves Top Gear. https://t.co/mu0blG9Svd — J.K. Rowling (@jk_rowling) July 17, 2015

.@HannahHedgehog He signed the petition for Clarkson's reinstatement. Said it was the only reason he paid the license fee. — J.K. Rowling (@jk_rowling) July 17, 2015

22. The time she got so fed with people asking her if the Cursed Child play was a prequel or not she went into a tweeting frenzy.

I can't remember whether I've mentioned this, but Harry Potter & the #CursedChild isn't a prequel. — J.K. Rowling (@jk_rowling) June 27, 2015

ok but isn't a Harry Potter prequel stage show just about a British orphan being sad? #oliver2 #CursedChild — mat whitehead (@matwhi) June 26, 2015

Not if it isn't a prequel. https://t.co/pb0DMEf4xw — J.K. Rowling (@jk_rowling) June 27, 2015

I think @jk_rowling needs to be more clear on whether or not #CursedChild is a prequel. — Jacob Cleary (@JacobCleary14) June 27, 2015

You're right, I have been guilty of shameful ambiguity in this matter. It isn't a prequel. https://t.co/ep6InUxL20 — J.K. Rowling (@jk_rowling) June 27, 2015

@jk_rowling wow! I didn't know that. I thought it was a prequel. Are you sure it's not a prequel??? — alina (@Alinamaite) June 27, 2015

You know what? I'm starting to wonder. Maybe it is. https://t.co/Vh7yaCKP2c — J.K. Rowling (@jk_rowling) June 27, 2015

23. This clear piece of advice.

.@itssaaaav Ideally, something that makes you happy and doesn't involve serial killing. Can't be more specific without further information. — J.K. Rowling (@jk_rowling) February 12, 2015

24. And, finally, this perfect Twitter motto.

If you're waiting for universal popularity, you'll be on Twitter a VERY long time. xxxx — J.K. Rowling (@jk_rowling) September 6, 2014

Happy 50th birthday, J.K. Don't ever change.