This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* By default, required field labels are rendered with the "required" class */ | |
.required:after { | |
content: "*"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$lista = array_map('unserialize', array_unique(array_map('serialize', $listaAtual))); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NLS_LANG <lang> - character set, language and territory | |
TNS_ADMIN <path> - path to tnsnames.ora file | |
PATH <path> - add location of the Oracle client |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ curl --data-binary @README.md -H 'Content-Type:text/plain' https://api.github.com/markdown/raw |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
acme_generate_image_service: | |
class: Acme\Component\GenerateImageConsumer | |
arguments: | |
- @logger |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Acme\Component; | |
use OldSound\RabbitMqBundle\RabbitMq\Producer; | |
class UploadImage | |
{ | |
protected $options = array(); | |
protected $generateFolder = null; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(e.g. for email templates) | |
Just set the assets_base_urls option under framework - templating key in your app/config/config.yml: | |
framework: | |
templating: | |
assets_base_urls: http://www.something.com/web/ | |
http://symfony.com/doc/current/reference/configuration/framework.html#assets-base-urls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// src/Bundle/Form/EventListener/AddExpiresAtFieldSubscriber.php | |
class AddExpiresAtFieldSubscriber implements EventSubscriberInterface | |
{ | |
private $factory; | |
public function __construct(FormFactoryInterface $factory) | |
{ | |
$this->factory = $factory; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
try{ | |
$em = $this->getDoctrine()->getManager(); | |
$em->persist($entity); | |
$em->flush(); | |
$this->get('session')->setFlash('notice', 'Article inserted!'); | |
return $this->redirect($this->generateUrl('article_show', array('id' => $entity->getId()))); | |
}catch(\Exception $e){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tr:nth-child(2n+1){ background: #fff } | |
tr:nth-child(2n+0){ background: #ffffec } |