{"size": 400, "ext": "js", "max_stars_repo_path": "public/js/application.js", "max_stars_repo_name": "jjuliano/trybato", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "public/js/application.js", "max_issues_repo_name": "jjuliano/trybato", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "public/js/application.js", "max_forks_repo_name": "jjuliano/trybato", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 25.0, "max_line_length": 71, "alphanum_fraction": 0.6175}
var editor = CodeMirror.fromTextArea(document.getElementById('code'), {
  mode: 'text/x-bato',
  styleActiveLine: true,
  lineNumbers: true,
  tabSize: 2
});

editor.setSize(520, 500);

$('#run').on('click', function(e) {
  e.preventDefault();
  $('.resulta').html('<img src="/images/loading.gif">');
  $.post('/', { code: editor.getValue() }, function(data) {
    $('.resulta').html(data);
  });
});