A Whole New Code Search
github.com
github.com
This kind of thing is best suited for a private repo (github is still ok, just make it private) - cause it's most likely of no use to anyone but that single user.
https://www.google.com/search?q=site%3Agithub.com+inurl%3A.s...
This is dangerous. But then again, is it Github's responsibility to keep these people from shooting themselves in the foot?
No.
Found via Github search
That's Ned Ruggeri, co-founder of App Academy (http://www.appacademy.io/). His HN account: http://news.ycombinator.com/user?id=ruggeri
Such as when it is a key file, or is a known credential file -- "amazon_s3.yml" for example, they should send a warning to the committer.
And then show a big red flag on the website if the repo is public.
And of course, remove the results from search.
I know it's not github's responsibility, but it would help make the web a bit safer.
Fantastic job, it works beautifully. Congratulations (to GitHub and to Elastic Search - I'm sure it's a big win for them too!)
Here's an interesting article describing how it worked: http://swtch.com/~rsc/regexp/regexp4.html
On a side note, I wonder how long before it'll be used to find security flaws in code (that results in an exploit) - I bet there are hundreds of hard-coded passwords, insecure defaults etc. all over the place.
Kudos to the whole team.
* Granted, uptime might have been a causality.
Bravo, Github!
Ugh.. that reminds me of the good old days when HN had visible karma points...
Allow us to search only within our starred repositories. The current search for starred repositories is not so great because it doesn't search the README (or code but README is more useful in finding the repo I want)
1212672153 documents across 2866400 repositories taking up 17 TB of disk space over 23 elasticsearch storage nodes fronted by 8 elasticsearch compute nodes
It took about a month to iterate over all the repositories stored on the file servers and index the source code.
This has a grandfathering problem when the maintainers switch. The new active branch of development is overshadowed by the previous branch. I've had someone takeover my project, but I still have 2 years of accumulated stars from when the project was fresh. The new development has less than 1/10 the number of stars as my branch. But I guess fixing this is kind corner case might be left for v2.
Here is an example. The query "format(args" will match "func formatArgs(args", but not "func format(args".
https://github.com/search?q=format%28args+repo%3Asimonz05%2F...
Is GitHub working on something similar? Or am I the only one who'd want search for this purpose?
It's just a shortcut for searching the current repository you are viewing (by adding a search box next to the tag count).
Go to one of my org's repos: http://github.com/railsforcharity/spokenvote
and search this string (which is in our seeds.rb): users << User.create({name: 'Voter1', email: 'voter1@example.com', password: 'abc123', password_confirmation: 'abc123'})
I not only don't get the right result, I don't get any text in the search results area of the page, not even a nothing found message. Same thing if I do the search on my personal fork.
All the userscript does is proxy the advanced search results page, so the search you tried hits this page:
https://github.com/search?type=Code&q=users+%3C%3C+User....
If you only search for voter1@example.com, results are shown:
https://github.com/search?type=Code&q=voter1%40example.c...
Anyways, you did find a "0 results" bug which should now be fixed. Thanks for that!
I need to read less and code more.
In my case I used this to correct an improper attribution to me, I searched for my name and came across:
https://github.com/dks/TinyOAuth
Except I didn't write OAuth.php. I wrote a different library.
I just did a search on my name and found a litle project I had never heard of that was based of a little thing I did.
Kind of ego boosting and nice to know that some things you do are actually found useful by people.
Though I suppose you can just search for <500 and stop looking when you get to 300.
Edit: And apparently "stars" for that matter.
Deleted comment