GithubHelp home page GithubHelp logo

vicever / koderunr Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jingkaihe/koderunr

0.0 3.0 0.0 1.57 MB

Running untrusted code using container - http://koderunr.tech

License: MIT License

Ruby 12.55% Go 64.40% Shell 3.48% HTML 8.30% CSS 0.90% JavaScript 10.37%

koderunr's Introduction

Koderunr

Koderunr (read code runner) is a container-based service that allows you to run code without programming language installation pain, instead the program will be executed remotely in a container.

Gif Example

Install

You can go to the cli directory and run go build to get the command line binary.

Or you can cross compile to the binaries that running on platforms including OS X, Linux, FreeBSD and OpenBSD by doing rake build, which can allow you to build production ready binaries.

Web Interface

Now it's live on http://koderunr.tech!

Examples

Suppose you have a ruby file called foo.rb, which has the source

print "Enter a number to count down: "
$stdout.flush
num = readline.to_i rescue 0

num.downto(0) do |i|
  puts "...#{i}"
  $stdout.flush
  sleep 1
end

puts "boom!"

You can execute the source code by running the command - and the results will be outputted as below with time intervals.

$ kode run foo.rb
Enter a number to count down: 4
...4
...3
...2
...1
...0
boom!

Also you can specified version of the language you want by

$ kode run foo.rb -version=2.3.0 # Running foo.rb using ruby 2.2.0

TODO

  • Support more languages (e.g. C, python, ruby, Erlang), at the moment only Go is supported. Now supporting Go, C, ruby, python.
  • Running the Docker containers in a proper Docker client rather than using system calls, so we can create-attach-run-kill containers automatically.
  • Serious cli support
  • cli configuration
  • Binaries distribution
  • Web interface that sucks less...
  • Server and Docker containers hosting
  • Support programming language versioning

koderunr's People

Watchers

Vicever avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.