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
FROM centos:latest | |
# ----------------------------------------------------------------------------- | |
# PHP | |
# ----------------------------------------------------------------------------- | |
RUN yum -y --setopt=tsflags=nodocs update | |
RUN yum -y --setopt=tsflags=nodocs --nogpgcheck install epel-release | |
RUN yum -y --setopt=tsflags=nodocs --nogpgcheck install http://rpms.remirepo.net/enterprise/remi-release-7.rpm | |
RUN yum -y --setopt=tsflags=nodocs --nogpgcheck --enablerepo=remi-php73 install \ | |
php-cli \ |
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
FROM alpine:latest | |
# ----------------------------------------------------------------------------- | |
# Install MariaDB | |
# ----------------------------------------------------------------------------- | |
RUN apk update | |
RUN apk add pwgen | |
RUN apk add mariadb mariadb-client | |
RUN rm -f /var/cache/apk/* |
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
import time | |
import os | |
import subprocess | |
import re | |
from watchdog.observers import Observer | |
from watchdog.events import FileSystemEventHandler | |
def outputCmd(cmd): | |
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) | |
stdout,stderr = proc.communicate() |
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 | |
/** | |
* Hex to RGBA | |
* | |
* @param string $hexColor | |
* @param string|int|double $opacity | |
* | |
* @return string | |
*/ |
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 | |
/** | |
* Add Working Day with Holidays | |
* | |
* @param \DateTimeInterface $first | |
* @param int|null $weekDay | |
* @param \DateTimeInterface[]|null $holidays | |
* | |
* @return \DateTimeInterface |
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 | |
namespace App\Service; | |
use Doctrine\Common\Collections\ArrayCollection; | |
use Doctrine\ORM\Query\Parameter; | |
use Symfony\Component\Process\Process; | |
/** | |
* Async SQL Query |
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 | |
/** | |
* ChoiceType "preferred_choice_twice" Extension | |
* | |
* @author Ramazan APAYDIN <[email protected]> | |
*/ | |
class ChoiceTypeExtension extends AbstractTypeExtension | |
{ | |
public function buildView(FormView $view, FormInterface $form, array $options) |
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 | |
$userHashKey = 'password'; | |
$privateUserPayloadData = [ | |
'userId' => 1, | |
'exp' => (new \DateTime('+5 hours'))->getTimestamp() | |
]; | |
// Generate Token | |
$token = JWT::encode($privateUserPayloadData, $userHashKey,'HS256'); |
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 | |
namespace App\Listener; | |
use Doctrine\ORM\Event\LoadClassMetadataEventArgs; | |
use Doctrine\ORM\Mapping\ClassMetadataInfo; | |
class TablePrefixListener | |
{ | |
protected string $tablePrefix = ''; |
OlderNewer