Last active
August 19, 2022 14:36
-
-
Save DarkCat09/cba140c921a5bed7f042e157b2319808 to your computer and use it in GitHub Desktop.
OneCompiler Private API (free)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JSCODE='(() => console.log(123))();' | |
# --------------------------------- | |
# Do not edit below this line | |
DATA=$(echo -n '{"name":"JavaScript","title":"JavaScript Hello World","version":"ES6","mode":"javascript","description":null,"extension":"js","languageType":"programming","active":true,"properties":{"language":"javascript","docs":true,"tutorials":true,"cheatsheets":true,"filesEditable":true,"filesDeletable":true,"files":[{"name":"HelloWorld.js","content":"-##CODE##-"}]},"visibility":"public"}' | sed "s/-##CODE##-/$JSCODE/") | |
curl 'https://onecompiler.com/api/code/exec' \ | |
-X POST -d "$DATA" \ | |
-H 'Content-Type: application/json; charset=utf-8' | |
echo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Try on Replit: https://replit.com/@DCat09/OneCompilerApi