Skip to content

Instantly share code, notes, and snippets.

View mpdude's full-sized avatar
💭
Coding

Matthias Pigulla mpdude

💭
Coding
View GitHub Profile
<?php
namespace Webfactory\Bundle\PagesBundle\Tests;
use Doctrine\ORM\Tools\Setup;
use Doctrine\ORM\EntityManager;
use Doctrine\ORM\Tools\SchemaTool;
use Doctrine\Common\Persistence\ObjectManager;
use Doctrine\Common\Persistence\ObjectRepository;
@mpdude
mpdude / phpunit.xsd
Last active December 29, 2015 02:28
XML Schema für PHPUnit
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Defines a xml schema for PHPUnit xml configuration files as described in
- the official PHPUnit documentation at:
- http://www.phpunit.de/manual/current/en/appendixes.configuration.html
-
- @author Matthias Molitor <matthias@matthimatiker.de>
- @version $Rev: 371 $
- @since 02.03.2011
-->
@mpdude
mpdude / gist:7590059
Created November 21, 2013 21:32
mod_rpaf configuration for transparent SSL termination on EC2 ELBs
LoadModule rpaf_module modules/mod_rpaf.so
<IfModule mod_rpaf.c>
RPAF_Enable On
RPAF_ProxyIPs 10.0.0.0/8
RPAF_SetPort On
RPAF_SetHTTPS On
</IfModule>
@mpdude
mpdude / gist:7372480
Created November 8, 2013 15:18
Pushing the ConsoleHandler to the Monolog "app" logger instance in Symfony2
<?php
// ... see http://symfony.com/doc/current/components/console/introduction.html#creating-a-basic-command
namespace Acme\DemoBundle\Command;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Bridge\Monolog\Handler\ConsoleHandler;
@mpdude
mpdude / gist:5825777
Last active December 18, 2015 18:29
Quick proof-of-concept patch for composer/composer#2022
diff --git a/src/Composer/DependencyResolver/RuleSetGenerator.php b/src/Composer/DependencyResolver/RuleSetGenerator.php
index b40ce1a..2255c36 100644
--- a/src/Composer/DependencyResolver/RuleSetGenerator.php
+++ b/src/Composer/DependencyResolver/RuleSetGenerator.php
@@ -12,6 +12,7 @@
namespace Composer\DependencyResolver;
+use Composer\Package\LinkConstraint\MultiConstraint;
use Composer\Package\PackageInterface;
@mpdude
mpdude / apache-2.2-mod_remoteip.c
Created December 3, 2011 13:04 — forked from bfg/apache-2.2-mod_remoteip.c
Working backport (doesn't crash when using Allow/Deny ACLs) of Apache 2.3 module mod_remoteip to Apache 2.2.x
/* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software