Small pieces of code that are well known by the programming community or used to solve challenges. Usually I like to test myself doing the challenges proposed by the following platforms below:
Codility is programming platform used for hiring developers from all around the world. What is awesome about Codility is that they provide free lessons and challenges, so the programmers can learn and test themselves. From every piece of code you run they give you a very good report as output, showing time/space complexity and how many test cases passed in your submission.
CodinGame is a free programming games platform that allows programmers from all over the world and from all backgrounds to improve and showcase their skills, learn, and meet their peers. By using gamification they encourage all kind of programmers to solve their challenges in a fun way.