<commit_before>doctype html
html
  head
    meta charset="utf-8"
    meta name="viewport" content="width=device-width, initial-scale=1.0"
    / bootstrap3
    link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css"

  body#app
    div.container
      div.row
        div.col-xs-4
          span = "your token is '#{@token}'"
        div.col-xs-4
          a.btn.btn-default href="/unauth" Unauthorize


    / jQuery (for Bootstrap)
    script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"
    / bootstrap3
    script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"
    / vue.js
    script src="http://cdn.rawgit.com/yyx990803/vue/master/dist/vue.min.js"
    javascript:
      new Vue({
        el: '#app'
      })<commit_msg>Test github API with authorized token via ajax.<commit_after>doctype html
html
  head
    meta charset="utf-8"
    meta name="viewport" content="width=device-width, initial-scale=1.0"
    / bootstrap3
    link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css"

  body#app
    div.container
      div.row
        div.col-xs-6
          span = "your token is '#{@token}'"
          span.hidden#token = @token
        div.col-xs-6
          a.btn.btn-default href="/unauth" Unauthorize
      div.row
        dl v-repeat="repositories"
          dt
            a href="{{html_url}}" = "{{name}}"
          dd = "{{description}}"
          dd = "Updated at {{updated_at}}"

    / jQuery (for Bootstrap)
    script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"
    / bootstrap3
    script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"
    / vue.js
    script src="http://cdn.rawgit.com/yyx990803/vue/master/dist/vue.min.js"
    javascript:
      new Vue({
        el: '#app',
        data: {
          repositories: []
        },
        created: function() {
          var _this = this;
          var token = $("#token").text();
          var root = "https://api.github.com";
          var api = "/user/repos";
          $.ajax({
            url: root + api + "?access_token=" + token,
            dataType: "json",
            success: function(res) {
              // console.log(res);
              _this.$set("repositories", res);
            }
          });
        }
      })
{'fraction_non_alphanumeric': 0.15577889447236182, 'fraction_numerical': 0.019262981574539362, 'mean_word_length': 1.9899874843554444, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6093429', 'n_tokens_mistral': 829, 'n_tokens_neox': 779, 'n_words': 137}