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
cp /home/user1/myfile123456789.txt{,-new} | |
и обратно: | |
cp /home/user1/myfile123456789.txt{-new,} |
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 | |
$qb | |
->delete(ProductImage::class, 'i') | |
->where($qb->expr()->in('i.oldId', ':ids')) | |
->setParameter('ids', $outDatedIds) | |
->getQuery() | |
->execute(); |
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
cat /proc/self/cgroup | grep -o -e "docker-.*.scope" | head -n 1 | sed "s/docker-\(.*\).scope/\\1/" |
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
<div style="margin:3em;"> | |
<button type="button" class="btn btn-primary btn-lg " id="load" data-loading-text="<i class='fa fa-circle-o-notch fa-spin'></i> Processing Order">Submit Order</button> | |
<br> | |
<br> | |
<button type="button" class="btn btn-primary btn-lg" id="load" data-loading-text="<i class='fa fa-spinner fa-spin '></i> Processing Order">Submit Order</button> | |
</div> |
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
curl -fsSL get.docker.com -o get-docker.sh; sh get-docker.sh |
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
return $this | |
->getEntityManager() | |
->getConnection() | |
->executeQuery( | |
"SELECT id, concat(first_name, ' ', last_name) name, avatar FROM profiles WHERE id IN (?)", | |
[$userIds], | |
[Connection::PARAM_INT_ARRAY] | |
) | |
->fetchAll(\PDO::FETCH_UNIQUE); |
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
package main | |
import ( | |
"fmt" | |
"sync" | |
) | |
type userSession struct { | |
sync.Mutex | |
userID int64 |
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
use Doctrine\ORM\Query\Expr\Join; | |
//... | |
//Many Sources has one country | |
$qb = $this->createQueryBuilder('country'); | |
return $qb | |
->join(Source::class, 'source', Join::WITH, 'source.country = country') | |
->getQuery() | |
->getResult(); |
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
use Doctrine\DBAL\Connection; | |
... | |
return $this | |
->getEntityManager() | |
->getConnection() | |
->executeQuery( | |
'SELECT * from posts WHERE id IN (?)', | |
[$postIdCollection], | |
[Connection::PARAM_INT_ARRAY] | |
) |
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\Form\Model; | |
use Doctrine\ORM\Mapping as ORM; | |
use Symfony\Component\Filesystem\Filesystem; | |
use Symfony\Component\HttpFoundation\File\File; |