Skip to content

Instantly share code, notes, and snippets.

Working from home

Filip Procházka fprochazka

Working from home
View GitHub Profile
andyshinn / composer.json
Last active Apr 27, 2022
Docker Compose PHP Composer Example
View composer.json
"require": {
"mfacenet/hello-world": "v1.*"
Solution / DoctrineExtension.php
Last active Jul 3, 2019
Gedmo extension for Kdyby\Doctrine and some changes in Gedmo\DoctrineExtensions
View DoctrineExtension.php
namespace Gedmo;
use Doctrine\Common\Annotations\AnnotationRegistry;
use Doctrine\ORM\Mapping\Driver as DriverMappingORM;
use Doctrine\Common\Persistence\Mapping\Driver as DriverORM;
use Doctrine\ODM\MongoDB\Mapping\Driver as DriverMongodbODM;
use Doctrine\Common\Annotations\Reader;
use Doctrine\Common\Annotations\CachedReader;
View Presenter.php
public function createComponent($name)
$ucname = ucfirst($name);
$method = 'createComponent' . $ucname;
if ($ucname !== $name && method_exists($this, $method)) {
$reflection = $this->getReflection()->getMethod($method);
if($reflection->getName() !== $method) {
lukas-vlcek / gist:4673027
Last active Jan 19, 2021
Čeština v elasticsearch
View gist:4673027
# download
# unzip and start
cd elasticsearch-0.20.4
# remove data in case you have defined some analyzers in the past (e.g. stop/start)
rm -rf data/
View DoctrineQueryBuilderBuilder.php
* @author Jan Marek
* @method QueryBuilderBuilder andWhere() andWhere(\mixed $where)
* @method QueryBuilderBuilder orderBy() orderBy(\string $sort, \string $order = null)
* @method QueryBuilderBuilder from() from(\string $from, \string $alias, \string $indexBy = null)
* @method QueryBuilderBuilder select() select(\string $select = null)
* @method QueryBuilderBuilder addSelect() addSelect(\string $select = null)
* @method QueryBuilderBuilder setMaxResults() setMaxResults(\int $maxResults)
* @method QueryBuilderBuilder setFirstResult() setFirstResult(\int $firstResults)
vojtech-dobes / MultiAuthenticator.php
Created Aug 31, 2012
Multiple ways of authentication in Nette
View MultiAuthenticator.php
namespace VojtechDobes\NetteSecurity;
use Nette\InvalidArgumentException;
use Nette\Security\IAuthenticator;
use Nette\Security\IIdentity;
View Google.php
use \Nette\Utils\Json;
* Minimalistic Google OAuth2 connector
* @author Mikuláš Dítě
* @license BSD-3
class Google extends Nette\Object
mishak87 / Router.php
Created May 24, 2012
Router for API REST like methods
View Router.php
namespace ApiModule;
use Nette,
class Router extends Nette\Object implements Nette\Application\IRouter
JanTvrdik /
Last active Jun 6, 2016
Add pull request to existing issue on github
current_branch="$(git symbolic-ref HEAD 2>/dev/null)" || current_branch="(unknown)"
if [[ $current_branch = "(unknown)" ]]