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 \Illuminate\Support\Facades\Log as Logger; | |
| /** | |
| * Class Log | |
| * | |
| * @method static emergency($message, array $context = []) |
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
| #!/usr/bin/env php | |
| <?php | |
| $domain = 'amobeeline'; | |
| $nginx = <<<CONF | |
| server { | |
| listen 80; | |
| listen 443 ssl; |
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 Finagin; | |
| use Finagin\Traits\Readable; | |
| use Finagin\Traits\TraitBootstrapper; | |
| class Example | |
| { | |
| use Readable, TraitBootstrapper; |
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 declare(strict_types=1); | |
| if (!function_exists('dump')) { | |
| function dump(...$args) | |
| { | |
| ob_start(); | |
| var_dump($args); | |
| file_put_contents('/tmp/igor.manual.log', ob_get_clean()); | |
| } | |
| } |
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 | |
| function dits(int $int, $min = 1): int | |
| { | |
| for($i = $min; $int > 1 << $i; $i++); | |
| return ++$i; /* "minus" bit */ | |
| } | |
| echo dits(9999999999999).'bits'; /* 45bits*/ |
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
| server { | |
| listen 80; | |
| server_name ~^(.+)\.dev$; | |
| set $path $1; | |
| if ($host ~ "([^\.]+)\.[^\.]+$") { | |
| set $path $1; | |
| } | |
| root /var/www/$path; |
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
| #!/usr/bin/env php | |
| <?php | |
| function check(string $password): int | |
| { | |
| $hash = strtoupper(hash('sha1', $password)); | |
| $start = substr($hash, 0, 5); | |
| $content = file_get_contents('https://api.pwnedpasswords.com/range/'.$start); |
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; | |
| use Finagin\Support\Singleton; | |
| class Instance extends Singleton | |
| { | |
| protected function __construct() | |
| { |
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
| for (var i = 0, l; ; = log[i]; ++i) { |
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
| #!/usr/bin/env php | |
| <?php | |
| function crow($dir = __DIR__) | |
| { | |
| $items = scandir($dir); | |
| foreach ($items as $item) { | |
| if (! preg_match('/^\.{1,2}$/', $item)) { | |
| $path = $dir.DIRECTORY_SEPARATOR.$item; |