Announcing GitHub Bookmarklet
You have to love GitHub! Just last week I was saying to Kamal on the phone that I now instinctively search for a project on GitHub before Google, because it’s likely to be there, and grabbing a copy or just browsing the source is made so easy for me.
What a shame it’s an extra few clicks to search it. Until now! Enter the GitHub Bookmarlet!
Install
Save the following link as a bookmark, or drag it to the links/bookmarks bar in your browser:
If you get stuck, Delicous have a lovely guide to bookmarklet installation.
Usage
When you click on the bookmarklet, it’ll give you a text prompt. Type in the name of the project you want to search for, and hit return. You’ll be taken to the GitHub search page for your query.
Hitting ESC or Cancel leaves your browser in it’s previous state.
User Macro
Want to search for a user? Type in ‘u:’ followed by your query. So for instance to look at Kamal’s github account, I would type in: u:kamal
.
Hitting Return or OK now takes you straight to the user’s Github profile, or shows you a 404 if there is no such user.
Code Search
As for user-search, but use the c: prefix. You can also use any of the GitHub macros as defined on the code-search page: http://github.com/codesearch. c: badger language:ruby
.
Acknowledgements
- John Gruber for his bookmarklet formatting script.
- The GitHub team for, well, Github.
Future
If you have any suggestions, send me a message on GitHub, or fork the project and throw me a pull-request once you’ve made your changes.