Skip to content

Commit 40060b0

Browse files
committed
2 parents f8df4b1 + e2571a5 commit 40060b0

File tree

1 file changed

+18
-12
lines changed

1 file changed

+18
-12
lines changed

README.md

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,13 @@
11
# PHP Sandbox
22

3-
<p align="center">
4-
<a href="https://github.com/markjivko/php-sandbox/blob/main/assets/preview.gif">
5-
<img src="https://repository-images.githubusercontent.com/460528694/c41b4a49-c4de-42a4-a8ea-18a7f80bef0e"/>
6-
</a>
7-
</p>
3+
This is a tiny PHP sandbox powered by Docker and [Ace editor](https://github.com/ajaxorg/ace).
84

9-
This is a tiny PHP sandbox powered by Docker and Ace editor.
5+
Use it for quick tests, pair programming or even online interviews.
106

117
<a href="https://github.com/markjivko/php-sandbox/blob/main/assets/preview.gif">
128
<img src="https://github.com/markjivko/php-sandbox/blob/main/assets/preview.gif?raw=true"/>
139
</a>
1410

15-
Use it for quick tests, pair programming or even online interviews.
16-
1711
## How to install
1812

1913
1. First install the **LAMP** stack (Apache, MySQL, PHP)
@@ -37,18 +31,30 @@ This is by design:
3731
* The only way to create new pages is to manually add text files in `/var/www/html/code/`
3832
* In order to make pages editable, manually change their permission to `666` (via cli or UI)
3933

40-
There is only 1 page available when you install this script, `two-sum.txt`;
34+
There is only 1 page available when you install this script, `two-sum.txt`.
4135
* In order to view it, open a browser at `http://localhost/two-sum/`
42-
* Make it editable with `sudo chmod 666 /var/www/html/code/two-sum.txt` or directly from your favorite file explorer
36+
* Make it editable with `chmod 666 /var/www/html/code/two-sum.txt` or directly from your favorite file explorer
4337

4438
3. Last but not least, [install **Docker**](https://docs.docker.com/engine/install/ubuntu/)
4539

4640
## Security
4741

48-
The project is read-only for Apache with the expection of text files you selected.
42+
The project is read-only for Apache with the exception of text files you selected.
4943

5044
Your text files are executed with PHP only inside of a Docker container.
45+
5146
* the container has read-only access to `/var/ww/html/code` only
5247
* the script is killed automatically after 3 seconds
48+
* script output is limited to 4096 bytes
49+
50+
## Improvements
51+
52+
The current version uses a basic state machine to check for changes and regularly fetch updates.
53+
54+
Websockets could be used to make the typing experience more fluid for all parties involved.
55+
56+
The app is intentionally bare-bones. There are no users/roles/databases to worry about; you just manually add text files in `/var/www/html/code/` and set their permissions accordingly.
5357

54-
You can safely run this script on your laptop (with correct port forwarding).
58+
> Simplicity is the ultimate sophistication.
59+
>
60+
> -- Leonardo Da Vinci

0 commit comments

Comments
 (0)