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.
| #!/bin/bash | |
| # A simple test script to demonstrate how to find the | |
| # "absolute path" at which a script is running. Used | |
| # to avoid some of the pitfals of using 'pwd' or hard- | |
| # coded paths when running scripts from cron or another | |
| # directory. | |
| # | |
| # Try it out: | |
| # run the script from the current directory, then |
| <?php | |
| namespace Application\ProdrepHelperBundle\Component\Event; | |
| use Symfony\Component\HttpFoundation\Response; | |
| use Symfony\Component\Security\Core\Exception\AuthenticationException; | |
| use Symfony\Component\Security\Core\Exception\AccessDeniedException; | |
| use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent; | |
| /** | |
| */ | |
| class AjaxAuthenticationListener |
| <?php | |
| require_once dirname(__DIR__).'/../../../../app/AppKernel.php'; | |
| /** | |
| * Test case class helpful with Entity tests requiring the database interaction. | |
| * For regular entity tests it's better to extend standard \PHPUnit_Framework_TestCase instead. | |
| */ | |
| abstract class KernelAwareTest extends \PHPUnit_Framework_TestCase | |
| { |
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.
| data:text/html, | |
| <body id='b'> | |
| <textarea spellcheck="false" id="t"></textarea> | |
| <script> | |
| var f, | |
| t = document.getElementById("t"), |
| server { | |
| listen 80; | |
| server_name localhost; | |
| root /home/website/web; | |
| rewrite ^/app\.php/?(.*)$ /$1 permanent; | |
| try_files $uri @rewriteapp; | |
| location @rewriteapp { |
| <?php | |
| namespace xPheRe\Bundle\TagBundle; | |
| use Symfony\Component\HttpKernel\Bundle\Bundle; | |
| use Symfony\Component\DependencyInjection\ContainerBuilder; | |
| use xPheRe\Bundle\TagBundle\DependencyInjection\Compiler\TagCollectionPass; | |
| class xPheReTagBundle extends Bundle | |
| { |
| license: gpl-3.0 | |
| height: 600 | |
| redirect: https://observablehq.com/@d3/d3-force-directed-graph |