This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 } |
This file contains hidden or 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 | |
| class TimeoutException extends RuntimeException {} | |
| class Timeout | |
| { | |
| private $active; | |
| public function set($seconds) | |
| { |
This file contains hidden or 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
| $ echo cmd | at 5am next year |
This file contains hidden or 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
| # The configuration file for agent. Note that this file | |
| # is likely to have unused configuration parameters in it; any parameter that's | |
| # valid anywhere in Puppet can be in any config file, even if it's not used. | |
| # | |
| # Every section can specify three special parameters: owner, group, and mode. | |
| # These parameters affect the required permissions of any files specified after | |
| # their specification. Puppet will sometimes use these parameters to check its | |
| # own configured state, so they can be used to make Puppet a bit more self-managing. | |
| # | |
| # Generated on 2012-05-21 11:08:46 +0200. |