
      <!DOCTYPE html>
      <html>
        <head>
          <meta charset="UTF-8">
          <meta name="viewport" content="width=device-width, initial-scale=1">
          <title>Antonio Tangarife</title>
          <meta name="description" content="Startups, Programming, Artificial Intelligence.">
          <link rel="icon" sizes="16x16 32x32" type="image/x-icon" href="http://antoniotangarife.com/public/img/favicon.png">
          <link rel="stylesheet" href="http://antoniotangarife.com/public/vendor/bootstrap/css/bootstrap.min.css">
          <link rel="stylesheet" href="http://antoniotangarife.com/public/vendor/animate/animate.css">
          <style>
            body {
              background-color: black;
              color: green;
              padding: 10px 20px;
              font-family: Courier, monospace;
            }

            #cursor {
              animation: blink 1s infinite;
              font-weight: bold;
            }
            @keyframes blink{
              to{opacity: .0;}
            }

            #command-box input, #command-box .input-group-addon {
              border: none;
              background: transparent;
              outline: none;
              padding: 0px;
              color: green;
            }

            #command-box input {
              color: lime;
              padding-left: 4px;
              height: 21px;
            }

            .command {
              color: lime;
              padding-left: 5px;
            }

            a {
              text-decoration: none !important;
              border-bottom: 1px dashed;
            }

          </style>
        </head>
        <body>
          <span id="terminal">
            <div id="results"><span id="cursor">|</span></div>
          </span>
          <script src="http://antoniotangarife.com/public/vendor/jquery/jquery.min.js"></script>
          <script src="http://antoniotangarife.com/public/js/lib.js"></script>
          <script>
          var wait = true
          var currentPath = "~$"
          function tt(text) {
            delay = 10
            c = text.charAt(0);
            if (c) {
              if (c=='|') {
                c = '<br>';
                delay = 200
              }
              text = text.substr(1);
              $('#cursor').before(c);

              if (!wait) {
                delay = 0
              }

              setTimeout(function(){
                tt(text)
              }, delay)
            } else {
              $('#cursor').remove()
              $('#terminal').append('\
                <div class="input-group" id="command-box"> \
                <span class="input-group-addon" id="current-path">'+currentPath+'</span> \
                <form method="post" action="http://antoniotangarife.com/command" id="command-form"> \
                  <input type="text" name="command" class="form-control" aria-describedby="current-path" autocomplete="off"> \
                </form> \
                </div>')
              $('#command-box input').focus()
            }
          }
          function scroll() {
            $("html, body").animate({ scrollTop: $(document).height() }, "slow", function(){
              $("#command-box input").focus()
            })
          }
          $(function(){
            tt('AI Terminal 0.01|Copyright (C) 2016|Antonio Tangarife||Loading Kernel... 100%|Loading AI Engine... 100%||Type \'help\' and press ENTER to see the list of commands.||')
            $(document).on("keypress", function (e) {
              wait = false
            })
            $(document).on("click", function(e) {
              $("#command-form input").focus()
            })
            $('#terminal').on('submit','#command-form', function(){
              var input = $('#command-box input')
              var box = $("#command-box")
              var formData = $(this).formData()
              var results = $("#results")

              if (input.val().toLowerCase() == "clear") {
                results.html('')
                input.val('')
              } else {
                results.append('<div class="line"><span class="prompt">'+currentPath+'</span><span class="command">'+escapeHtml(input.val())+'</span></div>')
                input.val('')
                results.append('<div id="loader"><img src="http://antoniotangarife.com/public/img/three-green-dots.svg" width="20"></div>')
                box.addClass('hide')
                $.post($(this).attr('action'), formData)
                  .done(function(json) {
                    result = JSON.parse(json)
                    $("#loader").remove()
                    results.append(result['response']+"<br>")
                    box.removeClass('hide')
                    $("#current-path").text(result['path'])
                    currentPath = result['path']
                    scroll()
                  })
                  .fail(function(xhr, status, error) {
                    $("#loader").remove()
                    results.append(error)
                    box.removeClass('hide')
                    scroll()
                  })
                }
              return false
            })
          })

          </script>
        </body>
      </html>
