All of them are grammatically correct. The prepositional phrase, by + gerund, emphasizes the technique or means. The present participial phrase modifies the subject, and has more emphasis on the activity.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.