<commit_before><?php
//// session
session_start();
//// tz
date_default_timezone_set('America/New_York');

//// need these
$webroot = '';
$fileroot = null;
//// determine fileroot based on host.
if (isset($_SERVER['HTTP_HOST'])) {
	//// remove port, if applicable
	$host = preg_replace('/([^:]+):\\d+/', '$1', $_SERVER['HTTP_HOST']);
	switch($host) {
		case 'demo.app':
			$fileroot = '/home/vagrant/Code/sites/PHP-Utils-Demo';
			break;
		case 'localhost':
			$fileroot = '/home/athill/Code/Homestead/sites/PHP-Utils-Demo';
			break;	
		case 'demo.andyhill.us':
			$fileroot = '/home/andyhil/sites/PHP-Utils-Demo';
			break;			
	}
}
$fileroot = $fileroot.$webroot;

//// autoloader
$loader = require_once($fileroot.'/vendor/autoload.php');

//// html engine. $h is a reserved variable of sorts.
$h = Athill\Utils\Html::singleton($webroot);

//// globally override things here. See Settings.php.
$basesettings = array(
	'webroot'=>$webroot,
	'fileroot'=>$fileroot,
);
//// set the wheels in motion
$setup = new Athill\Utils\Setup($basesettings);
//// $site is reserved as well. It determines various settings.<commit_msg>setup.inc.php: using __file__ to determine fileroot<commit_after><?php
//// session
session_start();
//// tz
date_default_timezone_set('America/New_York');

//// need these
$webroot = '';
$fileroot = dirname(__FILE__);
$instance = 'dev';

//// determine instance based on host
if (isset($_SERVER['HTTP_HOST'])) {
	//// remove port
	$host = preg_replace('/([^:]+):\\d+/', '$1', $_SERVER['HTTP_HOST']);
	switch ($host) {
		case 'demo.andyhill.us':
			$instance = 'prd';
			break;
	}
}

$fileroot = $fileroot.$webroot;

//// autoloader
$loader = require_once($fileroot.'/vendor/autoload.php');

//// html engine. $h is a reserved variable of sorts.
$h = Athill\Utils\Html::singleton($webroot);

//// globally override things here. See Settings.php.
$basesettings = array(
	'webroot'=>$webroot,
	'fileroot'=>$fileroot,
	'instance'=>$instance
);
//// set the wheels in motion
$setup = new Athill\Utils\Setup($basesettings);
//// $site is reserved as well. It determines various settings.
{'fraction_non_alphanumeric': 0.19923918212077985, 'fraction_numerical': 0.0009510223490252021, 'mean_word_length': 3.927400468384075, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 8, 'https://': 0, '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': '7339704', 'n_tokens_mistral': 750, 'n_tokens_neox': 726, 'n_words': 164}