Hacker News new | past | comments | ask | show | jobs | submit login
Interactive Javascript Terminal as a personal website (enekoalonso.com)
74 points by ryduh on Nov 4, 2010 | hide | past | favorite | 27 comments




That's a remarkably terrible way to implement a terminal.


It was never my intent to implement a terminal. The site does not execute any system commands at all on the server side. Pretty much, all commands are 'custom' or invented, to show stuff about me and stuff I've worked on (a long, long time ago). Nothing else.


glad to see HN is enjoying yesterday's release of mod_pagespeed: http://enekoalonso.com/terminal.php?command=ls&path=../....


We (DreamHost) don't have mod_pagespeed support out quite yet, but the feature should be available to our customers by the end of the day today, as soon as I flip the switch to turn it on. :)


Nice. The code was already checking for '..' on the path, but the condition was erroneous. Fixed now.


You might be better off getting the canonical path and then checking against a whitelist. E.g. `strpos(realpath($command_path), '/var/www/html/') === 0`.


XKCD switched their web page to such a pseudo-terminal on April's Fools day: http://uni.xkcd.com/

(And there was a cut down adventure game hidden in it).


At least in chrome the backspace key performs a browser back. Should try to overload the key with keydown event.

Would also be cool to have a history of ran commands or tab-completion functionality =)


I wrote the site on an afternoon a couple of years ago and haven't had time or energy to update it.

If anyone is interested, please grab the code :) There is nothing server side other than the 'ls' command, which is nothing else than a directory listing in php (no system command at all is run on the server). All other commands are just basic Javascript.


I'll just leave this here: http://goosh.org/



This would be an awesome way to port over Zork or any Infocom game to the internet!


You can play them all here: http://www.accardi-by-the-sea.org/Infocom/Online/ - Java, but nonetheless... Great games!


http://parchment.toolness.com/ an interactive fiction game archive in HTML and Javascript



Note that it won't work on mobile devices, and probably has some accessibility issues too. Fancy, shiny new things are neat, but show off that you know standards and accessibility at the same time.


Very cool, but no backspace/delete/arrow key support? Can't seem to correct a typo other than just hitting enter, getting the 'command not found' message and retrying.


http://adlaiff6.github.com/

Old data, but it runs on a (young, but) flexible sh emulation, and by messing with the virtual filesystem you can get it to do whatever you want (try readlink, for example). Grab code from github.com/adlaiff6/jsh and github.com/adlaiff6/readline.js.

Doesn't work on firefox for me right now, don't remember why, I haven't touched the code in a long time.


It looks so much like a terminal that I had a "that's impossible!" reaction when I typed "whois" and got a picture.


i like that more than most websites. very fast. minimum of visual noise. substance over flashiness.


i have something similar http://miketung.com/sh/ . Supports personal home directories with the 'login' command (uses oauth).


Awesome idea, doesn't work so smoothly yet.


doesn't work with vimperator on ff


Isn't there a pass through mode?


Yep, but I didn't know about it until now.


neat stuff.




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

Search: