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
const path = require('path') | |
const fs = require('fs') | |
const execSync = require('child_process').execSync | |
if (!process.argv[2] || !process.argv[3]) { | |
throw new Error('you did not pass the source and destination paths') | |
} | |
const searchPath = path.join(process.cwd(), process.argv[2]) | |
const destination = path.join(process.cwd(), process.argv[3]) |
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\Controller; | |
use App\Entity\Profile; | |
use App\Entity\User; | |
use Doctrine\ORM\EntityManagerInterface; | |
use mysql_xdevapi\Exception; | |
use Symfony\Component\HttpFoundation\Request; | |
use Symfony\Component\Routing\Annotation\Route; |
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
private static function recurseCopy($src, $dst) | |
{ | |
$dir = opendir($src); | |
@mkdir($dst, 0777, true); | |
while (false !== ($file = readdir($dir))) { | |
if (($file !== '.') && ($file !== '..')) { | |
if (is_dir($src.'/'.$file)) { | |
self::recurseCopy($src.'/'.$file, $dst.'/'.$file); | |
} else { | |
copy($src.'/'.$file, $dst.'/'.$file); |
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); | |
namespace App; | |
use Symfony\Component\HttpFoundation\Response; | |
use Twig\Environment; | |
use League\OAuth2\Client\Provider\Google as GoogleProvider; |