Skip to content

Instantly share code, notes, and snippets.

@okwrtdsh
Created June 8, 2018 17:00
Show Gist options
  • Save okwrtdsh/0a5299a704e2793e69beb3f6c133ecbc to your computer and use it in GitHub Desktop.
Save okwrtdsh/0a5299a704e2793e69beb3f6c133ecbc to your computer and use it in GitHub Desktop.
function runkotlin() {
  name=$(echo "$1" | sed s/\.kt//g)
  kotlinc ${name}.kt -include-runtime -d tmp.jar
  java -jar tmp.jar ${@:2}
  rm -f tmp.jar
}
function runts() {
  name=$(echo "$1" | sed s/\.ts//g)
  tsc ${name}.ts --outFile tmp.js
  node tmp.js ${@:2}
  rm -f tmp.js
}
function runrust() {
  name=$(echo "$1" | sed s/\.rs//g)
  rustc ${name}.rs -o tmp
  ./tmp ${@:2}
  rm -f tmp
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment