Making curl + github easy / case sensitive github code search

Create a visible / easy to reuse token in https://github.com/settings/applications by storing the token in the application name.

Screen Shot 2014-11-24 at 10.31.40 AM

 

Use curl to search for code (notice the per-page 100) and grep case sensitive.


curl -s -H 'Accept: application/vnd.github.v3.text-match+json' --user "TOKEN_GOES_HERE:x-oauth-basic" 'https://api.github.com/search/code?per_page=100&page=3&q=user:YOURORG+SEARCHTERM' | grep 'SearchTERM'

 

Availble as reusable script: https://github.com/grosser/github-grep

Good repository descripton = more wachers

All my repos that have a bad or unclear description have few watchers. Why? Because many of them are not found through google, but from people that watch one of my plugins and have a look at the rest. Any repository that does not clearly state its use, within the 3 seconds of read it gets, is not looked at further.

  • Which architecture does it use ? – prefix with e.g. Rails: AR: jQuery:
  • What does it do? – clear, short explanation

Bad — When Active Record objects are saved from a form, empty fields are saved as empty strings instead of nil. This kills most validations.

Good — AR: store empty strings as NULL, making queries + conditions simpler and code more robust

And now ill continue renaming… 😉