<commit_before><!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no">
    <title><?=gethostname();?></title>
    <link rel="stylesheet" type="text/css" href="http://mincss.com/entireframework.min.css">
    <style media="screen" type="text/css">
      .msg {
        background-color: #F7F7F7;
        border-left: 5px solid #C0C0C0;
      }
      code {
        background-color: #F7F7F7;
        margin-left: 0.1em;
        margin-right: 0.1em;
        color: #580000;
      }
    </style>
</head>
  <body>
    <div class="container">
      <div>
        <h2><?=gethostname();?></h2>
        <p>Welcome to your container powered webserver!</p>
      </div>

      <div class="sites">
<?php
  foreach(scandir(getcwd()) as $item) {
    if (in_array($item, array('.', '..'))) {continue;}
    if (!is_dir($item)) {continue;}
    printf('<a class="btn smooth btn-a" href="http://%s.loc/" target="_blank">%s.loc</a>&nbsp;', $item, $item);
  }
?>
        <p><br /></p>
      </div>

      <div class="hostrecords">
        <h3>How it works</h3>
        <p>
          Projects placed in the <code>www/</code> directory are automatically set up as virtual hosts with their own domain names. For instance, a directory <code>mysite</code> can be reached via <code>http://mysite.loc/</code> after you configured its <code>/etc/host</code> record.
        </p>
        <div class="msg">
<pre><?php
  foreach(scandir(getcwd()) as $item) {
    if (in_array($item, array('.', '..'))) {continue;}
    if (!is_dir($item)) {continue;}
    printf("10.0.3.10\t%s.loc\n", $item);
  }<commit_msg>Leverage /etc/lxc-containervars.php, less hardcodes<commit_after><?PHP

// Load the container variables, exported as PHP variables during initialization.
require "/etc/lxc-containervars.php";

// Generate a reliable list of projects.
$projects = array();
foreach(scandir(getcwd()) as $project) {
  if (in_array($project, array('.', '..'))) {
    continue;
  }
  if (!is_dir($project)) {
    continue;
  }
  $projects[] = $project;
}

?>
<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no">
    <title><?=gethostname();?></title>
    <link rel="stylesheet" type="text/css" href="http://mincss.com/entireframework.min.css">
    <style media="screen" type="text/css">
      .msg {
        background-color: #F7F7F7;
        border-left: 5px solid #C0C0C0;
      }
      code {
        background-color: #F7F7F7;
        margin-left: 0.1em;
        margin-right: 0.1em;
        color: #580000;
      }
    </style>
</head>
  <body>
    <div class="container">
      <div>
        <h2><?=gethostname();?></h2>
        <p>Welcome to your container powered webserver!</p>
      </div>

      <div class="sites">
<?php
  foreach($projects as $project) {
    printf('<a class="btn smooth btn-a" href="http://%s.loc/" target="_blank">%s.loc</a>&nbsp;', $project, $project);
  }
?>
        <p><br /></p>
      </div>

      <div class="hostrecords">
        <h3>How it works</h3>
        <p>
          Projects placed in the <code>www/</code> directory are automatically set up as virtual hosts with their own domain names. For instance, a directory <code>mysite</code> can be reached via <code>http://mysite.loc/</code> after you configured its <code>/etc/host</code> record.
        </p>
        <div class="msg">
<pre><?php
  foreach($projects as $project) {
    printf("%s\t%s.loc\n", $lxc_ipv4_address, $project);
  }
{'fraction_non_alphanumeric': 0.1902101622772014, 'fraction_numerical': 0.017291832934291033, 'mean_word_length': 2.9620653319283456, 'pattern_counts': {'":': 0, '<': 96, '<?xml version=': 0, '>': 94, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 1, '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': '3459605', 'n_tokens_mistral': 1341, 'n_tokens_neox': 1319, 'n_words': 291}