Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
5 minute fork (5minfork.com)
151 points by dave1010uk on March 18, 2013 | hide | past | favorite | 34 comments


What this project does really wasn't clear to me until I tried reidrac's canvas-raycasting URL, so here is a (hopefully more clear) explanation:

If a github repo has an index.html file and you click on it, github will show you the source instead of the webpage. 5minfork shows you the webpage so that you can have an idea of what the repo is about.


If you don't mind, I'll pinch that and whack it on the index.html page.


I certainly don't mind! I'm glad I could be useful.


Tried it with the only repo I have with plain html/js* and works like a charm. Pretty neat!

*http://5minfork.com/reidrac/canvas-raycasting


I understand users' need for this, but as a this is your code, why don't you also push it to the gh-pages branch? That would make the exact same thing available at http://reidrac.github.com/canvas-raycasting (and then add a link to your README)


I actually hosted a demo for that repo in a different server.

I'm not saying it's useful to host your own demo (although it could be a temporarily demo deployed on demand). I think 5minfork is cool if you want to try a project and the repo owner didn't put a demo website, that's the problem the author wants to solve and I think it's a great idea specially if you can't get the code and try it locally (mobile browsing?).


I used to try to do that with my projects, but I found keeping the gh-pages branch in sync with my master just enough of a pain that it quickly got neglected. I'm not saying you shouldn't, and personally, I'd rather there be a hosted example of the repo - I just made 5minfork for those ones that (I often found) didn't have the live example.


I never bother with an orphan branch, just create a gh-pages branch from master and fast-forward it when you want to "deploy".


I tried to find the exit :(


Sorry, it's just a demo and not a real game :)


Great idea. I guess one could even do this with rails / django / node projects as long as they're being run in a sandbox, but that's probably way more work. Nevertheless, great. It happens so often that I see something on Github that simply lacks a live demo. Thanks!


And one could maybe even extend this to resolve external dependencies that are also hosted on Github, but that would also be way more work.


Obligatory bookmarklet:

  javascript:void(document.location='http://5minfork.com'+document.location.pathname)


document.location is deprecated^Wcannot be assigned to in Internet Explorer.

    javascript:void location='http://5minfork.com'+location.pathname


Whups! Thanks.


Is there a generally accepted term for the Domain Swap as User Interface that this uses? I've come across the same idea [1] on several different sites/services and was just curious.

1. youtube.com -> youtuberepeater.com and reddit.com/r/aww -> imgur.com/r/aww


If I had to invent a name I'd call it "path compatibility", but I've never seen anything mentioned.


Remy's block post about the idea and development: http://remysharp.com/2013/03/18/quick-dirty-forking/


Wouldn't it be more efficient to extract just the "working directory" without all the .git mess? That is if github supports git archive.


As an alternative, there's also a chrome/firefox extension that does this discussed here on HN a while ago.

http://ryt.github.com/githtml/ https://news.ycombinator.com/item?id=4198064


I can see the value in this, but I probably wouldn't use it. I run a WAMP server on my desktop and have made an Alias in my httpd.conf to my Github Repos directory, allowing me to cruise in and see example html pages very easily. I just clone the repo in windows, and then I can use /git/REPO/coolthing.js in a script tag. I use a chrome extension for rendering README.md (markdown) files.

I use Apaxy (http://adamwhitcroft.com/apaxy/ ) to get a better folder view. The instructions for setting up an Alias are here: http://serverfault.com/questions/7323/httpd-conf-and-setting...

Hope this helps someone out there. It's really simple to do.


*actually, I may use it, but I do my own, similar, thing!


Unfortunately, I found that 5 minute fork doesn't initialize git submodules for https://github.com/Khan/khan-exercises. :(


File an issue, and I'll add that - and yeah, even better, if you can do a pull request it saves me writing it :)


Liked it. For ease of use it'd be more handy when one does't swap but adds: (the way you PWN YouTube)

Eg.

https://github.com/reidrac/canvas-raycasting (repo)

https://5mgithub.com/reidrac/canvas-raycasting (Doable??)

Or just 'f' for fork:

https://fgithub.com/reidrac/canvas-raycasting (Doable??)


I've found http://htmlpreview.github.com to be pretty useful as well. Any notable differences?


Apparently, 5 Minute Fork clones the whole repo and serves it up at its own subdomain and htmlpreview doesn't, so for example some single page JS apps (the one I tried is my own https://github.com/mikecrittenden/toogles) will work in 5 min fork and not htmlpreview.


You sir, are a gentleman and a scholar. It's a great idea, I needed something like this 3 or 4 times in the last 2 weeks.


I like this a lot. I hate dealing with the gh-pages orphan branch, so this is definitely something I'll look at implementing.


Out of curiosity, how would you think about security when running a service like this? Anything could be in those repos, no?


It's something I did give a little thought to, but it's simply that all new subdomains create a new router that only allow for static content and directory listings. So nothing's being executed server side.

A gave a little thought outside of that, but not much. I'm all ears if I've accidentally opened up a bag of worms!


Ah you beat me to this idea! Nice one :)


This is great for me. Thank you so much.


This is great! Thank you.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: