Skip to content

Instantly share code, notes, and snippets.

@DarkCat09
Last active August 19, 2022 14:36
Show Gist options
  • Save DarkCat09/cba140c921a5bed7f042e157b2319808 to your computer and use it in GitHub Desktop.
Save DarkCat09/cba140c921a5bed7f042e157b2319808 to your computer and use it in GitHub Desktop.
OneCompiler Private API (free)
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
@DarkCat09
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment