Skip to content

Instantly share code, notes, and snippets.

View programgames's full-sized avatar
🏠
Playing video games or coding

Julien Marcon programgames

🏠
Playing video games or coding
View GitHub Profile
@programgames
programgames / datagrids.yml
Created November 26, 2021 13:24
DQL in oro datagrid
frontend-customer-user-shopping-list-grid:
source:
type: orm
query:
select:
- name.string AS productName
- >
(
SELECT parent1.left FROM \Oro\Bundle\CatalogBundle\Entity\Category parent1
WHERE parent1.id = (
@programgames
programgames / ExportEmailTemplatesCommand.php
Created November 26, 2021 13:22
Export EmailTemplateCommand
class ExportEmailTemplatesCommand extends Command
{
/** @var string */
protected static $defaultName = 'app:export:email-templates';
private ManagerRegistry $doctrine;
private FileManager $fileManager;
/**
@programgames
programgames / LoadAttribute.php
Created November 26, 2021 13:21
Product Attribute migration
Product attributes :
<?php
declare(strict_types=1);
namespace namespace;
use Doctrine\Common\DataFixtures\AbstractFixture;
use Doctrine\Common\Persistence\ObjectManager;
@programgames
programgames / Set java home var for ES
Last active February 5, 2021 11:17
Set java home var for ES
go to /usr/local/Cellar/elasticsearch-full/7.10.1/libexec/bin/elasticsearch-env
add
JAVA_HOME=$(/usr/libexec/java_home -v11)
JAVA="$JAVA_HOME/bin/java"
JAVA_TYPE="JAVA_HOME"
@programgames
programgames / Tricks Oro.md
Last active February 5, 2021 10:51
Tricks Oro general

redirection images

$url = $_SERVER['REQUEST_URI'];
$prefix = '';
if (preg_match('#\.(jpe?g|png|gif|svg)+.*#', $url, $matches)) {
    header('Location: https://picsum.photos/200/300.jpg', true, 302);
    return;
}

Keybase proof

I hereby claim:

  • I am programgames on github.
  • I am programgames (https://keybase.io/programgames) on keybase.
  • I have a public key ASDX3HakMo6INOjYhpuUfzCrb7PcuBB7GRKU8Zl_wIy9Hgo

To claim this, I am signing this object: