This file contains 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 Migration Script | |
* | |
* @author Rasmus Schultz <rasmus@mindplay.dk> | |
* @license http://www.gnu.org/licenses/gpl-3.0.txt | |
* | |
* This script will scan through an entire PHP codebase and rewrite the | |
* scripts, adding a namespace clause based on the directory structure, |
This file contains 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
diff --git a/Mime/BodyRenderer.php b/Mime/BodyRenderer.php | |
index 5e75a69..ed105cf 100644 | |
--- a/Mime/BodyRenderer.php | |
+++ b/Mime/BodyRenderer.php | |
@@ -46,6 +46,14 @@ final class BodyRenderer implements BodyRendererInterface | |
} | |
$messageContext = $message->getContext(); | |
+ | |
+ $previousRenderingKey = $messageContext[__CLASS__] ?? null; |
This file contains 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 | |
/* composer.json | |
{ | |
"require": { | |
"symfony/security-core": ">=3.4" | |
} | |
} | |
*/ | |
require 'vendor/autoload.php'; |
This file contains 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/Controller/DecisionController.php | |
namespace App\Controller; | |
use Symfony\Component\HttpFoundation\Request; | |
use Symfony\Component\HttpKernel\UriSigner; | |
use App\EventListener\SignedAuthorizationRequestSubscriber; | |
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; | |
use Symfony\Component\Routing\Annotation\Route; |
This file contains 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
-----BEGIN PGP SIGNED MESSAGE----- | |
Hash: SHA512 | |
Thu May 31 10:26:33 CEST 2018 | |
For a number of reasons, I've recently set up a new PGP key | |
and will be transitioning away from my old one. | |
The old key will continue to be valid for a short period after |
This file contains 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
$DefaultNetstreamDriverCAFile /etc/ssl/certs/ca-certificates.crt | |
template( | |
name="PaaSLog" | |
type="list" | |
) { | |
constant(value="<") | |
property(name="pri") | |
constant(value=">1") | |
constant(value=" ") |
This file contains 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 | |
$fp = fopen("/tmp/example", "rb+"); | |
$fz = fopen("php://temp", "wb+"); | |
fwrite($fz, "\x1f\x8b\x08\0\0\0\0\0\0\xFF", 10); | |
$fltr = stream_filter_append($fz, "zlib.deflate", STREAM_FILTER_WRITE, -1); | |
$size = stream_copy_to_stream($fp, $fz); | |
stream_filter_remove($fltr); |
This file contains 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 | |
require 'vendor/autoload.php'; | |
function it($m,$p){echo "\033[".($p?"32m✔":"31m✘")." It $m\033[0m\n"; if(!$p)register_shutdown_function(function(){die(1);});} | |
$nativeDateTime1 = new \DateTime('2015-02-23 20:30:00', new \DateTimeZone('Europe/Madrid')); | |
$nativeDateTime2 = new \DateTime('2015-02-23 20:30:00', new \DateTimeZone('Europe/London')); | |
it('should be different', $nativeDateTime1 != $nativeDateTime2); |
NewerOlder