You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use it for quick tests, pair programming or even online interviews.
16
-
17
11
## How to install
18
12
19
13
1. First install the **LAMP** stack (Apache, MySQL, PHP)
@@ -37,18 +31,30 @@ This is by design:
37
31
* The only way to create new pages is to manually add text files in `/var/www/html/code/`
38
32
* In order to make pages editable, manually change their permission to `666` (via cli or UI)
39
33
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`.
41
35
* 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
43
37
44
38
3. Last but not least, [install **Docker**](https://docs.docker.com/engine/install/ubuntu/)
45
39
46
40
## Security
47
41
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.
49
43
50
44
Your text files are executed with PHP only inside of a Docker container.
45
+
51
46
* the container has read-only access to `/var/ww/html/code` only
52
47
* 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.
53
57
54
-
You can safely run this script on your laptop (with correct port forwarding).
0 commit comments