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
| #!/bin/bash | |
| # | |
| # /etc/rc.d/init.d/mms-agent | |
| # | |
| # 10Gen Mongod montiroing service | |
| # must edit the settings.py first and edit this file with the location of agent.py | |
| # | |
| # description: 10Gen monitoring service - need ot fix pid so we can shut it down | |
| # chkconfig: - 90 10 |
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
| daemon --name=mms-agent --user=mongod --pidfile=/var/run/mongodb/mms-agent.pid "/usr/bin/python /usr/local/lib/mms-agent/agent.py > /var/log/mongo/mms-agent.log 2>&1 &" |
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 MyNamespace\Controller; | |
| use JMS\DiExtraBundle\Annotation\Inject; | |
| class PostsController | |
| { | |
| /** | |
| * @Inject("my_namespace.post_repository") |
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
| <services> | |
| <service id="my_bundle.twig.string.loader" class="Twig_Loader_String" /> | |
| <service id="my_bundle.twig.string" class="Twig_Environment"> | |
| <argument type="service" id="my_bundle.twig.string.loader" /> | |
| </service> | |
| </services> |
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 ...\Bundle\MyBuyndle\Tests; | |
| use Symfony\Bundle\FrameworkBundle\Test\WebTestCase as BaseWebTestCase; | |
| use Symfony\Component\HttpFoundation\Response; | |
| /** | |
| * @author Tyler Stroud <tyler@tylerstroud.com> | |
| */ |
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
| # Clear APC caches | |
| after "deploy:finalize_update" do | |
| pretty_print "--> Clearing APC caches" | |
| run "cd #{release_path} && php app/console apc:clear --env=prod" | |
| puts_ok | |
| end |
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 | |
| use Doctrine\ODM\MongoDB\Configuration; | |
| use Doctrine\ODM\MongoDB\Mapping\Driver\AnnotationDriver; | |
| use Doctrine\ODM\MongoDB\DocumentManager; | |
| use Doctrine\Common\Annotations\AnnotationReader; | |
| use Doctrine\Common\Annotations\AnnotationRegistry; | |
| use Doctrine\MongoDB\Connection; | |
| /** |
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
| <parameters> | |
| <parameter key="my_bundle.my_model.form.type.class">My\Bundle\RestBundle\Form\Type\MyModelFormType</parameter> | |
| <parameter key="my_bundle.my_model.form.handler.class">My\Bundle\RestBundle\Form\Handler\MyModelFormHandler</parameter> | |
| </parameters> | |
| <services> | |
| <service id="my_bundle.my_model.form.type" class="%my_bundle.my_model.form.type.class%"/> | |
| <service id="my_bundle.my_model.form" factory-method="create" factory-service="form.factory" class="Symfony\Component\Form\Form"> | |
| <argument type="service" id="my_bundle.my_model.form.type"/> | |
| </service> |
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 | |
| protected function getErrorsForForm(Form $form) | |
| { | |
| $errors = []; | |
| foreach ($form->all() as $child) { | |
| foreach ($child->getErrors() as $error) { | |
| $errors[$child->getName()][] = $error->getMessage(); | |
| } | |
| if ($child->count() > 0) { | |
| $childErrors = $this->getErrorsForForm($child); |
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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <project name="my-project" default="build"> | |
| <target name="build" depends="prepare,install-dependencies,lint,phploc,pdepend,phpmd-ci,phpcs-ci,phpcpd,phpdoc,phpunit,phpcb"/> | |
| <target name="build-parallel" depends="prepare,lint,tools-parallel,phpunit,phpcb"/> | |
| <target name="tools-parallel" description="Run tools in parallel"> | |
| <parallel threadCount="2"> | |
| <sequential> |