I have a bit of experience with this question. I have sat in two job interviews as a candidate, and tens as an interviewer, so I do know both sides of the story.
As an interviewer, I don't care if you think you're not good at interviews. You just need to give it a red hot crack. To be fair to all candidates, there needs to be a systematic and uniform approach.
It's never about the actual answer, or the actual solution, it's about the thought process that counts in an interview. So, if you're not getting the question, vocalize the thought process. Ask questions. Probe the scenario.
Regarding contributing to projects on github. I think it's a bit of bad advice to contribute to projects you use daily. My advice would be to pick something that interests you. Smaller projects are easier to get started with.
Even if you were excellent at interviews, you should still try to build a portfolio of work that you can show off. You never know on the day how you will do, and who you are up against. And keep in mind, it's not just about the code that you push to projects, it's how you interact in pull requests when you get feedback.
As an interviewee, the first interview I didn't expect to land, so I went in there very casually, more looking for experience than anything. I did very well. I got the job. In the second interview, I was really nervous. I really wanted the role at that company. I completely panicked and really struggled to complete the tasks. I walked out of that interview feeling very dejected. I got the job.
So regardless of how you are going in an interview, it's usually not as bad as you think.