Skip to content

Instantly share code, notes, and snippets.

View sryabov's full-sized avatar

Sergey Ryabov sryabov

View GitHub Profile
@sryabov
sryabov / autocomplete.vue
Created June 20, 2018 20:07
vuetify autocomplete component example
<template>
<v-autocomplete
v-model="select"
:loading="loading"
:items="items"
:search-input.sync="search"
no-filter
hide-selected
clearable
return-object
@sryabov
sryabov / CachedDirectoryRepository.php
Created February 21, 2017 16:21
Universal caching Repository for Symfony
<?php
namespace BlogBundle\Entity\Repository;
use Doctrine\ORM\EntityRepository;
class CachedDirectoryRepository extends EntityRepository
{
const CACHE_TIME = 3600; // 60 * 60
/**
@sryabov
sryabov / doctrine
Created October 20, 2016 19:44
Установка объекта без получения в Doctrine2
$carReference = $entityManager->getReference('MyBundle:Car',$carId);
$wheel->setCar($carReference);
@sryabov
sryabov / config.yml
Last active October 18, 2016 15:11 — forked from K-Phoen/config.yml
Storing Symfony2 sessions in memcached
imports:
# ....
- { resource: services/session.yml }
framework:
# ....
session:
handler_id: session.handler.memcached