Skip to content

Instantly share code, notes, and snippets.

@nikrou
nikrou / User.php
Last active November 27, 2022 17:32
User and UserDataPersister
<?php
namespace App\Entity;
use ApiPlatform\Core\Annotation\ApiResource;
use App\Repository\UserRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Security\Core\User\EquatableInterface;
use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
@nikrou
nikrou / Group.types.yaml
Last active March 14, 2018 17:56
User group graphql
Group:
type: object
config:
description: "A group that can contains users"
fields:
id:
type: "Int!"
description: "The unique id of the group"
name:
type: "String!"
@nikrou
nikrou / package.json
Last active March 4, 2017 21:14
webpack angular hmr
{
"name": "webpack-hmr",
"version": "0.0.0",
"description": "",
"main": "index.js",
"scripts": {
"build": "webpack --bail --progress --profile -p",
"dev": "webpack-dev-server --port 9100 --progress --colors --hot --inline"
},
"author": "",
import React, {Component} from 'react';
import Hello from '../components/Hello';
class App extends Component
{
render() {
return (
<Hello />
);
}
@nikrou
nikrou / gist:999f9cb0913d3b364099
Last active August 29, 2015 14:01
Test Fields
<?php
public function testfieldsDiffer($driver, $create_query) {
$controller = new \atoum\mock\controller();
$controller->__construct = function () {};
$dblayer = new \mock\dbLayer($driver, $controller);
$this->calling($dblayer)->driver = $driver;
$this->calling($dblayer)->execute = null;
$s = new \dbStruct($dblayer,$this->prefix);