This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* | |
* This content is released under the MIT License (MIT) | |
* | |
* @author Don Myers | |
* @license http://opensource.org/licenses/MIT MIT License | |
* @link https://github.com/ProjectOrangeBox | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
declare(strict_types=1); | |
/** | |
* File System Functions | |
* | |
* File System Abstraction which automatically | |
* works in a given root path | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class readCsv implements Iterator | |
{ | |
const ROW_SIZE = 8192; | |
protected $handle = NULL; | |
protected $currentRow = NULL; | |
protected $rowCounter = NULL; | |
protected $hasHeader = null; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Install Gulp | |
https://nodejs.org/en/ | |
* Install Node | |
Node.js v12.16.1 to /usr/local/bin/node | |
npm v6.13.4 to /usr/local/bin/npm | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function base62_encode($num) { | |
$b = 62; | |
$base = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; | |
$r = $num % $b ; | |
$res = $base[$r]; | |
$q = floor($num/$b); | |
while ($q) { | |
$r = $q % $b; | |
$q = floor($q/$b); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Bash Shell Find Out If a Variable Is Empty Or Not | |
Let us see syntax and examples in details. The syntax is as follows for if command: | |
if [ -z "$var" ] | |
then | |
echo "\$var is empty" | |
else | |
echo "\$var is NOT empty" | |
fi | |
OR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class cleanUp | |
{ | |
static public function folder(string $folder, string $fileRegEx, int $days, bool $recusive = true): int | |
{ | |
$count = 0; | |
if (!\FS::file_exists($folder)) { | |
throw new \Exception('Folder "' . $folder . '" not found.'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* File System Functions | |
* | |
* File System Abstraction which automatically | |
* works in a given root path | |
* | |
* Can be added with composer by adding a composer.json file with: | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
OWNER="drpepper" | |
GROUP="administrators" | |
PUBLICDIRECTORY="" | |
# used by crontab | |
MAXLOGAGE="7 days" | |
MAXLOCKAGE="4 hours" |
NewerOlder