Remember how I manage my dev bookmarks to save time and nerves? Well, many times I find myself bookmarking links just for some pieces of code that I find in the link. I would then add the code snippets the bookmark's description and the rest is not that relevant. Or there are times when I know I have this piece of code some "old" project and I really need to dig some time to get it...
Well, to make my life easier in these cases I came up with a special type a bookmark, I call it a codelet. In a codelet you save one or more code snippets, add a title and tags to it and optionally a source URL for your inspiration and comments about the snippets. It's similar to Github's gists, but I think is user friendlier and belongs to my dev bookmarks.
The easiest way to add a new codelet is by using a +Codelet bookmarklet when you are browsing the web :
The search at the end of the demo is configured in AlfredApp with a custom query -
If you use IntelliJ products I have developed a plugin to make it ease from IDE:
When you are using code snippets from some place else, you can use the + > Codelet option in the menu bar:
To search for codelets just select My Codelets option in the search bar:
or use a custom query on AlfredApp as mentioned above if you are on MacOS.
I have a couple of ideas in mind how will I extend this functionality. Among others:
- add the possibility to make the codelets public, thus searchable, so that others can get inspired too
- extend the Save to Bookmarks.dev chrome extension to easily save code snippets when surfing the web
- create IDE plugins (JetBrains and Visual Studio Code) to save code snippets in My Codelets on bookmarks.dev
What do you think? Is it something you might use? I hope you can give it a try and leave your feedback in the comments bellow. Thanks