We want to show a flash message as the result of executing some controller. This message will only last for the next request.
I propose to use the new addFlash()
method available in the base controller of Symfony 2.6:
--- | |
- hosts: all | |
user: root | |
sudo: true | |
tasks: | |
- name: update apt | |
command: apt-get update | |
- name: update bash |
use Doctrine\Common\Collections\ArrayCollection; | |
use Doctrine\Common\Collections\Collection; | |
use Doctrine\Common\Inflector\Inflector; | |
use Doctrine\Common\Persistence\Mapping\AbstractClassMetadataFactory; | |
use Doctrine\ORM\EntityManager; | |
use Doctrine\ORM\Mapping\ClassMetadata; | |
use Doctrine\ORM\Mapping\ClassMetadataInfo; | |
use Doctrine\ORM\Mapping\MappingException; | |
use Doctrine\ORM\PersistentCollection; | |
use Foodity\CoreBundle\Helper\EntityHelper; |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
--- | |
- name: Deploy new site release | |
user: deployer | |
hosts: all | |
tasks: | |
- name: Fetch repo updates | |
git: > | |
repo=git@github.com:my/repo.git |
<?php | |
namespace Acme\YourBundle\Serializer; | |
use JMS\Serializer\Context; | |
use JMS\Serializer\JsonSerializationVisitor; | |
use JMS\Serializer\Metadata\ClassMetadata; | |
/* | |
* Copyright 2014 Paul Ferrett <paul@paulferrett.com> |
A primitive Double A (AAA-minus-Accounting) RBAC system implemented in declarative Nginx config.
So I noticed https://github.com/alexaandru/elastic_guardian, a simple AAA reverse-proxy to sit in front of Elasticsearch. Reading the source and comments tickled my "why is this in code not config?" funnybone.
I asked @alexaandru (https://twitter.com/jpluscplusm/status/438339557906735104) who told me it was mostly the resulting complexity of the nginx config he tried that prompted him to write it.
*.php filter=subvars |
When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:
const Article = require('../../../../app/models/article');
Those suck for maintenance and they're ugly.