News for hackers. Stuff that matters.
Re:Repo.js by landhar on Monday July 02, 2012 @12:53PM (#4189649)
When clicking on a file to preview it, you should append the name of the file to the bread crumbs, to show that you can go back to the listing by clicking back on the repo name. It took me a while to figure that out.
Re:Repo.js by jameswyse on Monday July 02, 2012 @05:31AM (#4188086)
This looks very handy, thanks!

I can see this being useful in tutorial articles to allow the user to see all the code involved at once.

Re:Repo.js by tzaman on Monday July 02, 2012 @03:44AM (#4187799)
Nice, although not very useful - i'd recommend at least having clone URL and view raw option (if possible)
Re:Repo.js by Joe8Bit on Monday July 02, 2012 @04:30AM (#4187934)
I was going to do something very similar to this, so thanks for saving me the effort! :)

I already built a couple Github jQuery widgets that people in this thread might also find relevant: http://www.joepettersson.com/demo/pretty-gist/ http://www.joepettersson.com/demo/jquery-github-widget/

Re:Repo.js by Ygg2 on Monday July 02, 2012 @08:26AM (#4188533)
Is there any way to return from file preview? Like for example if I click README.txt and I want to go back to see the rest of code.
Re:Repo.js by jlward4th on Monday July 02, 2012 @10:26AM (#4188985)
I built a little JS library that just does that part: http://www.jamesward.com/2012/06/15/dynamically-rendering-gi...
Re:Repo.js by stayclassytally on Monday July 02, 2012 @09:23AM (#4188729)
You can click the Repo title again to return to the root, or the '..' if you're inside a folder.
Re:Repo.js by Ygg2 on Monday July 02, 2012 @01:05PM (#4189717)
Weird. Sometimes it works, other times it's just a blank page. It's still an elegant piece of code.
Re:Repo.js by cvrajeesh on Monday July 02, 2012 @04:15AM (#4187882)
I believe GitHub Api has got max request limits, how you are going to handle this?
Re:Repo.js by thecodemonkey on Monday July 02, 2012 @07:28AM (#4188388)
It shouldn't be a problem as all requests are handled client side
Re:Repo.js by cvrajeesh on Monday July 02, 2012 @02:48PM (#4190267)
On a corporate environment, all the outbound requests will be from one proxy, which could eat the request/ip rate very easily.
Re:Repo.js by termit on Monday July 02, 2012 @05:49AM (#4188134)
Awesome, I like it!
Re:Repo.js by techtrainer on Monday July 02, 2012 @05:28PM (#4191115)
Very nice. Thank you.
Re:Repo.js by drivebyacct2 on Monday July 02, 2012 @04:07AM (#4187865)
I'm not sure what I would use this for, but it is neat.

I would recommend allowing one to set a max height. It's rather impractical to have a 200px tall box turn into an enormous box with 500 lines of CSS.

Re:Repo.js by Argorak on Monday July 02, 2012 @09:35AM (#4188780)
I was looking for something like this for quite a while. From time to time, I want to write about code organization, but always struggle on how to present that. Being able to embed a Github repo in a post seems like a great way of doing that. Its not like I would embed the repo of an actual, big project.