Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
./bin/update
<?php
namespace Sylius\Bundle\CartBundle\Entity;
use Sylius\Bundle\ResourceBundle\Doctrine\ORM\EntityRepository;
class CartRepository extends EntityRepository
{
protected function getQueryBuilder()
{
@umpirsky
umpirsky / contributors
Last active December 15, 2015 08:49
List of contributors for Symfony organization.
1. fabpot (13338)
2. weaverryan (2626)
3. bschussek (1707)
4. Seldaek (777)
5. vicb (724)
6. kriswallsmith (693)
7. schmittjoh (636)
8. stof (444)
9. Tobion (424)
10. pborreli (353)
<?php
class ThreadCountersListener implements EventSubscriberInterface
{
protected $commentManager;
public function __construct(CommentManagerInterface $commentManager)
{
$this->commentManager = $commentManager;
}
@umpirsky
umpirsky / grep
Last active December 10, 2015 00:38
Symfony/Component/Config/Definition/ReferenceDumper.php
41: * @param int $depth
158: * @param int $indent
Symfony/Component/Finder/Finder.php
165: * @param int $level The depth level expression
Symfony/Component/Finder/Iterator/DepthRangeFilterIterator.php
27: * @param int $minDepth The min depth
28: * @param int $maxDepth The max depth
<?php
use Silex\ControllerResolver as BaseControllerResolver;
/**
* Injects container into controllers.
*
* @author Саша Стаменковић <umpirsky@gmail.com>
*/
class ControllerResolver extends BaseControllerResolver
<?php
namespace Avalanche\Bundle\ImagineBundle\Imagine;
use Symfony\Component\DependencyInjection\ContainerAware;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/**
* Imagine cache manager.
*
@umpirsky
umpirsky / Application.php
Created November 2, 2012 14:40
Enable query logging for Doctrine in Silex
<?php
if ($this['debug']) {
$logger = new DebugStack();
$this->extend('doctrine_orm.configuration', function(Configuration $configuration) use ($logger) {
$configuration->setSQLLogger($logger);
return $configuration;
});
@umpirsky
umpirsky / ManagerRegistry.php
Created October 23, 2012 16:20
Use the entity form type in Silex
<?php
namespace Umpirsky\Doctrine\Common\Persistance;
use Doctrine\Common\Persistence\AbstractManagerRegistry;
use Silex\Application;
/**
* References Doctrine connections and entity/document managers.
*
@umpirsky
umpirsky / arecord
Created October 18, 2012 22:21
$ arecord -L
$ arecord -L
default
Playback/recording through the PulseAudio sound server
sysdefault:CARD=NVidia
HDA NVidia, ALC888 Analog
Default Audio Device
front:CARD=NVidia,DEV=0
HDA NVidia, ALC888 Analog
Front speakers
surround40:CARD=NVidia,DEV=0