This file contains hidden or 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
if (! function_exists('istr_contains')) { | |
/** | |
* Insensitively check if given haystack contains anything like the given needle(s). | |
* | |
* @param string $haystack | |
* @param string[] $needles | |
* @return boolean | |
*/ | |
function istr_contains($haystack, $needles = []) | |
{ |
This file contains hidden or 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
import { map, forEach } from 'lodash'; | |
class FileUploadQueue { | |
/** | |
* Create the upload queue | |
* | |
* @param Array | Object supported [{name:'photos', mime:'image'}] | |
* @return void | |
*/ | |
constructor (supported = []) { |
This file contains hidden or 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 | |
namespace App\Support; | |
use ArrayIterator; | |
use Countable; | |
use DatePeriod; | |
use DateTime; | |
use DateInterval; | |
use IteratorAggregate; |
This file contains hidden or 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 is_date($value): bool | |
{ | |
if ($value instanceof DateTime) { | |
return true; | |
} | |
if ((! is_string($value) && ! is_numeric($value)) || strtotime($value) === false) { | |
return false; | |
} |
This file contains hidden or 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 | |
# Since bash is following a Procedural execution, defining functions first is required. | |
runInstaller () | |
{ | |
ValidateAndInstallDependencies | |
valiteUserAndEnterHome | |
cloneRepoAndEnterDirectory | |
setupDatabase |
This file contains hidden or 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 | |
namespace Vitanova\Utilities; | |
use Illuminate\Contracts\Cache\Repository; | |
use Psr\Cache\CacheItemInterface, | |
Psr\Cache\CacheItemPoolInterface, | |
Psr\Cache\InvalidArgumentException; |
NewerOlder