15 websites where you can find code snippets

by on May 24th, 2011 3 comments

If you have been developing and designing websites for quite some time, you are definitely reusing CSS, HTML, PHP, or JavaScript code repeatedly, just like most computer programmers do. Luckily for all of use, there are quite a few websites, which we can use to find some great pieces of code, post our own, or even build collection of code snippets, nicely and neatly organized and stored on a remote server. Here are 15 websites, where you can find code snippets:

1. Code Snippets

Has close to 9000 users and thousands of code snippets, and after creating a free account, you can post your own to the site as well. The snippets are tagged and divided into categories, which makes finding what you are looking for extremely easy.

2. Css-tricks

This is a CSS dedicated site, with wealth of information, articles, videos, downloads, and message boards. Its code snippet page offers CSS, HTML, HTAccess, JavaScript, PHP, JQuery, and WordPress snippets, which snippets you can download and comment on.

3. Snipplr

Has one of the richest code snippet collections and the site is very well organized and with clean design. You can search of browse more than 1100 snippets, as well as check out the most popular or the most recently added from the front page.

4. Devsnippets

Apart from some great articles, Devsnippets has a good public collection of snippets as well.

5. ByteMyCode

Excellent collection of code snippets; the site is very well organized, and extremely easy to navigate and use as well. The collection contains PHP, Java, JavaScript, adapter, VBScript, battery, C, String, CSS and many other categories and if you are often looking for a piece of code in a hurry, then this is the site, which you need to bookmark!

6. Codesnipp.it

Another decent and neatly organized collection of public code snippets. You can browse the codes by category, search by particular keyword or author, and post your comments as well (free registration required).

7. Snipt.org

Sign in with your Twitter account, search for snippets, check out the top rated, or add your code and store it as private or public.

8. Symfony-project

Has a well-organized collection of PHP code snippets. Anyone can download the code and if you register, you can add, rate, or comment on snippets as well.

9. Smipple

A social site for storing, sharing, and posting snippets. Once you register or login with your Google account, you would be able to add snippets or bookmark the ones that you like.

10. Code Sucks

A website, which has collections of CSS layouts, web templates, and CSS, Javascript, and PHP snippets. At the time of this writing, the code snippet section is rather small, but you can definitely find some gems in it.

11. Gist – GitHub

Offers a free service, which allows you to create public or private “gist,” store it on their server, and create your own repository.

12. CodeTidy

The site you should use if you wish to store and share your code in a matter of seconds.

13. Koders

A huge, open source resource center, which stores more than three billion lines of code. You can search reusable code by license and programming language or submit your own project.

14. Dreamincode

Offers ActionScript, ASP, Bash, ASP.NET, Python, Assembly, Lisp, C, C#, C++, Perl, HTML, Java, PHP, Ruby, and quite a few more language snippets, and has almost 500 000 registered members.

15. Phpsnips

Has a decent collection of PHP snippets, function, and classes, which you can browse alphabetically or search by key terms.

Do you have a favorite snippet tool or code repository? Please share with us in the comments.