A chrome extension to execute code in 2 steps
Collate is a chrome extension which will detect the language of code snippet you select and execute it.
Currently, to execute any piece of code you find over the web, you change the tabs, search for online compilers or copy it and run on your machine.
No more of this now!
Collate is a chrome extension, the first of its kind. All you need to do is select the code snippet you want to run and press "Ctrl/Cmd + B"
.
In case you want to modify the selected code, we have provided a code editor too.
Collate currently supports following languages:
- Python
- C++
- JAVA 8
You need to have Docker and Node v14.16.0 in your machine.
Here are the installation guides for Docker:
Here are the installation guides for Node:
Assuming you have Dependencies installed, run the following commands in your terminal:
-
Clone this repository.
$ git clone https://github.com/silentC1C4D4/collate
-
Pull these three images.
$ docker pull python:latest $ docker pull gcc:4.9 $ docker pull openjdk:latest
-
Navigate to Collate directory.
$ cd Collate $ npm install
-
Navigate to ./frontend/mainpage.js on line 86 change the address to your preferred one.
Example:http://52.172.170.205:4000/?lang=
tohttp://localhost:4000/?lang=
-
Start the server.
$ npm run watch
In case you don't have sudo privileges to docker, you can make following changes.
-
While pulling images:
$ sudo docker pull python:latest $ sudo docker pull gcc:4.9 $ sudo docker pull openjdk:latest
-
While starting the server:
$ sudo node index.js
- You need to install chrome extension locally.
- Navigate to chrome://extensions/
- Turn on Developer mode
- Go to "Load Unpacked"
- Browse to ./frontend
Instead of having different folders for each language, we are planning to create random file names with each request.
If you want to run a Java code, the class name must be "Main".
This project is under MIT License