Skip to content

Instantly share code, notes, and snippets.

View nicolasbonnici's full-sized avatar
👾
Having fun

nicolasbonnici nicolasbonnici

👾
Having fun
View GitHub Profile
@nicolasbonnici
nicolasbonnici / SearchOrFilter.php
Last active November 2, 2024 19:52
SearchOrFilter for API Platform 4
<?php
namespace App\Filter;
use ApiPlatform\Doctrine\Orm\Filter\FilterInterface;
use Doctrine\ORM\Query\Expr\Comparison;
use Doctrine\ORM\QueryBuilder;
use ApiPlatform\Doctrine\Orm\Util\QueryNameGeneratorInterface;
use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\PropertyInfo\Type;
@nicolasbonnici
nicolasbonnici / widget-vc-banner.html
Last active June 6, 2017 14:24
Widget Visualcommerce banner
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Test Visual Commerce</title>
</head>
<body>
<p><a href = 'https://rawgit.com/kcassam/56ebb828d9fb1869a3fd5425e9d02f98/raw/560c10d03b5bb0fc1dd50de1747e16654e966fa8/widget-banner.html'>Code here</a></p>
<div id="widget-container"></div>
@nicolasbonnici
nicolasbonnici / vc-widget-gallery.html
Last active June 6, 2017 14:21
Widget Visualcommerce galerie
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.ahead(100);