Skip to content

Instantly share code, notes, and snippets.

View lenybernard's full-sized avatar
🇨🇵

Leny BERNARD lenybernard

🇨🇵
View GitHub Profile
<Location />
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /app.php [QSA,L]
####################################################
########### MAINTENANCE FILE HANDLE ################
ErrorDocument 503 /maintenance.html
### add here the granted ips ###
diff --git a/src/Behat/MinkExtension/Context/MinkContext.php b/src/Behat/MinkExtension/Context/MinkContext.php
index 90ea038..8d6537b 100644
--- a/src/Behat/MinkExtension/Context/MinkContext.php
+++ b/src/Behat/MinkExtension/Context/MinkContext.php
@@ -238,22 +238,34 @@ class MinkContext extends RawMinkContext implements TranslatableContext
/**
* Checks, that page contains specified text.
+ * @param string $text the text to check
+ * @param integer $timeout in milliseconds
@lenybernard
lenybernard / app__config__hwi_oauth.yml
Created November 15, 2016 22:39
Gitlab OAuth configuration for "hwi/oauth-bundle"
hwi_oauth:
firewall_names:
- main
connect:
account_connector: app.security.provider.gitlab
fosub:
username_iterations: 30
properties:
gitlab: gitlabId
resource_owners:
@lenybernard
lenybernard / XliffFixerCommand.php
Created January 26, 2017 22:35
Symfony console command to parse xliff files to add or update missing id attribute
<?php
namespace AppBundle\Command;
use Doctrine\ORM\EntityManager;
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
<?php
namespace AppBundle/Controller;
class PaymentController extends Controller
{
public function paymentAction($redurectUrl)
{
$form = $this->get('app.payment.form_handler')->generateForm($redirectUrl);
return $this->render('AppBundle:Payment:form.html.twig', [
[Tue Jul 11 17:20:22.290520 2017] [:error] [pid 16444] [client 92.88.237.125:56034]
PHP Fatal error: Uncaught Symfony\\Component\\Debug\\Exception\\FatalErrorException:
Error: Uncaught Symfony\\Component\\Debug\\Exception\\FatalThrowableError:
Call to a member function getId() on null in /var/www/quovadis.eu/releases/20170612153347/src/AppBundle/Controller/Admin/Quommunity/QuommunityParticipationsController.php:31
Stack trace:
#0 [internal function]: AppBundle\\Controller\\Admin\\Quommunity\\QuommunityParticipationsController->indexAction()
#1 /var/www/quovadis.eu/releases/20170612153347/var/bootstrap.php.cache(3242): call_user_func_array(Array, Array)
#2 /var/www/quovadis.eu/releases/20170612153347/var/bootstrap.php.cache(3201): Symfony\\Component\\HttpKernel\\HttpKernel->handleRaw(Object(Symfony\\Component\\HttpFoundation\\Request), 1)
@lenybernard
lenybernard / XliffFixerCommand.php
Created April 30, 2018 13:19
Will parse every xliff files and will add missing id attributes to be compliant with strict Symfony xliff parsing
<?php
namespace AppBundle\Command;
use AppBundle\Entity\Event\Event;
use AppBundle\Entity\Event\Topic;
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
@lenybernard
lenybernard / docker-compose.yml
Last active January 10, 2020 10:28
Wordpress docker-compose
version: '3.3'
services:
db:
image: mysql:5.7
volumes:
- db_data:/var/lib/mysql
restart: always
ports:
- "45562:3306"
<VirtualHost *:80>
ServerName mywebsite.com
ProxyPreserveHost On
ProxyPass / http://127.0.0.1:7051/
ProxyPassReverse / http://127.0.0.1:7051/
ProxyPassReverseCookieDomain 127.0.0.1 mywebsite.com
</VirtualHost>
<VirtualHost *:80>
ServerName mywebsite.com
ProxyPreserveHost On
ProxyPass / http://127.0.0.1:7051/
ProxyPassReverse / http://127.0.0.1:7051/
ProxyPassReverseCookieDomain 127.0.0.1 mywebsite.com
+ RewriteEngine on
+ RewriteCond %{SERVER_NAME} =mywebsite.com