I was coding in Python almost 24/7 when studying at University and loved teaching so I started offering private python courses for students that had problems with it (it was mandatory also for some non-IT studies) in exchange for beer/dinner/cash etc... One of them was my close friend that I knew for a very long time, he got very excited to the point he applied to the python-dev job at a major international corporation. During the interview, he was very shy and the employer didn't have confidence that his python skills are sufficient for the position he applied to so he gave him a coding homework (simple stuff, convert some XML output to a nice HTML page). He forwarded it to me asking for help if I could do this because he really wanted to get the job. I didn't have the heart to tell him his skills are not as high as they should be so I wrote that homework for him. Also as a kind of payback as he actually helped me before to get my job I was working at that time. In the homework, I put there a lot of comments with in-depth explanation of how each piece worked and some of them contained rude words like "this sh does not handle utf-8 so we need to monkey patch it here and do some black magic below" with instruction that he should read the comments to understand it and delete them before submitting it for next interview round. Of course, he did not. So he went to the next round in the interview with the homework, opened it up. Everything working perfectly, even the comments with rude words made a good laugh that he hasn't removed. He made a so good impression with that that the guy immediately put him an offer for employment discarding all previous candidates as he thought he is just a classic IT guy that is very bad when it comes to social interaction but when closed in a room, is coding like a beast. When the contract was presented to him, he made a long awkward pause and disclosed that I made the homework and it was not his own work. The guy then made him another offer to give him my contact details in exchange for dinner & beer for both of us if I show up at the interview. I wasn't really looking for a job change but I thought its cool since I was a student eating cheap instant noodles to save money everywhere I could so a nice dinner (normal food, yay!) sounded good for just showing up at the interview. I was immediately presented with an offer that I took even if it was not my intention as I just had a few nasty arguments at the current job. The position was for a fixed time, just for one small project but I started poking around with their security systems and built a complete system for remote forensic acquisition while my manager was looking to free up money to offer me a full-time position. (successfully).
This was how I got my previous job, which I already left to fund a startup for providing reconnaissance/OSINT as a service but that's another even longer story.