This commit is contained in:
2018-08-08 23:12:47 -07:00
parent cbf6506290
commit ff19eeab6c
232 changed files with 319180 additions and 1246 deletions

25
utils/generate_default_prefs Executable file
View File

@@ -0,0 +1,25 @@
#!/usr/bin/php
<?
$p['bdest'] = "/tmp/";
$p['rsync_dest'] = "";
$p['readability'] = 0;
$p['fixatimes'] = 0;
$p['verify_stat'] = 0;
$p['meta'] = 1;
$p['thumbs'] = 1;
$p['thumb_size'] = 512;
$p['hash'] = 1;
$p['hash_limit'] = 1;
$p['contents'] = 1;
$p['spotlight'] = 1;
$p['profile'] = 1;
file_put_contents("prefs.php",serialize($p));
//$p = unserialize(file_get_contents(__DIR__."/prefs.php"));
//print_r($p);
?>

42
utils/polyfill.php Executable file
View File

@@ -0,0 +1,42 @@
#!/usr/bin/php
<?
// Polyfill
// Fill a volume with many small files
$base = "/Volumes/Polyfill";
$total = 10000;
for ($i = 0; $i < $total; $i++) {
$stamp = md5(microtime());
$levels = array();
$levels[] = substr($stamp,0,2);
$levels[] = substr($stamp,2,2);
$levels[] = substr($stamp,4,2);
$levels[] = substr($stamp,6,2);
$levels[] = substr($stamp,8,2);
$levels[] = substr($stamp,10,2);
$dest = $base."/".implode("/",$levels)."/".$stamp;
$check = array();
$check[] = $base."/".$levels[0];
$check[] = $base."/".$levels[0]."/".$levels[1];
$check[] = $base."/".$levels[0]."/".$levels[1]."/".$levels[2];
$check[] = $base."/".$levels[0]."/".$levels[1]."/".$levels[2]."/".$levels[3];
$check[] = $base."/".$levels[0]."/".$levels[1]."/".$levels[2]."/".$levels[3]."/".$levels[4];
$check[] = $base."/".$levels[0]."/".$levels[1]."/".$levels[2]."/".$levels[3]."/".$levels[4]."/".$levels[5];
foreach ($check as $dir) {
echo "check ".$dir."\n";
if (!file_exists($dir)) {
mkdir($dir);
}
}
echo $dest."\n";
copy("test.jpg",$dest.".jpg");
//file_put_contents($dest,serialize($levels));
}
?>

BIN
utils/test.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB