Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
| require 'fileutils' | |
| start_time = Time.now | |
| SOURCE_DB = { | |
| :name => 'db_name', | |
| :user => 'db_user', | |
| :password => 'db_pass', | |
| :host => 'localhost' |
| # You can set these variables from the command line. | |
| SPHINXOPTS = | |
| SPHINXBUILD = sphinx-build -c . | |
| PAPER = | |
| BUILDDIR = build | |
| SOURCE = source |
| #!/bin/bash | |
| USER=ec2-user | |
| echo 'Removing host keys' | |
| sudo /bin/rm -rf /etc/ssh/ssh_host*_key* | |
| echo 'Removing ec2-user' | |
| userdel -f $USER ; /bin/rm -rf /home/$USER |
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
You often need subsets of objects in a collection and want to access them efficiently in your domain model. But you certainly don't want to access the EntityManager or any other object manager here to craft a query. FilterExpressions for collections allow to go back to the database and query for all objects matching the crafted expression. Additionally they also work against in meemory ArrayCollection exactly the same. This way you don't (except for the SQL performance when it haunts you ;)) have to think about the context and can focus on your domain logic.
In Doctrine ORM this will be done by building DQL under the hood, in memory it will be done using Collection#filter(Closure $closure);
| <?php | |
| use Symfony\Component\Routing\RouterInterface; | |
| use Symfony\Component\Routing\RequestContext; | |
| use Symfony\Component\Routing\RouteCollection; | |
| use Symfony\Component\Routing\Exception\RouteNotFoundException; | |
| use Symfony\Component\Routing\Exception\ResourceNotFoundException; | |
| use Symfony\Component\Routing\Exception\MethodNotAllowedException; | |
| use Symfony\Component\Routing\Route; | |
| use Symfony\Component\Routing\Generator\UrlGenerator; |
The list would not be updated for now. Don't write comments.
The count of contributions (summary of Pull Requests, opened issues and commits) to public repos at GitHub.com from Wed, 21 Sep 2022 till Thu, 21 Sep 2023.
Because of GitHub search limitations, only 1000 first users according to amount of followers are included. If you are not in the list you don't have enough followers. See raw data and source code. Algorithm in pseudocode:
githubUsersLocate the section for your github remote in the .git/config file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git@github.com:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
| <?php | |
| namespace Acme\Bundle\UserBundle\Form; | |
| use Symfony\Component\Form\AbstractType; | |
| use Symfony\Component\Form\FormEvents; | |
| use Symfony\Component\Form\FormBuilderInterface; | |
| use Symfony\Component\Form\FormEvent; | |
| class UserType extends AbstractType |