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 | |
function generatePlaceholderSvg(string $originalImageBinary, string $placeholderImageBinary, ?string $idSuffix = null): string | |
{ | |
$originalImageSizeInfo = getimagesizefromstring($originalImageBinary); | |
if (!is_array($originalImageSizeInfo) || !isset($originalImageSizeInfo[3])) { | |
throw new \RuntimeException('Unable to get image size info.'); | |
} |
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 App\Service; | |
use Imagine\Image\Box; | |
use Imagine\Image\ImageInterface; | |
use Imagine\Image\Point; | |
use Liip\ImagineBundle\Imagine\Filter\Loader\LoaderInterface; | |
class PlaceholderOutlineFilter implements LoaderInterface |
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
#!/bin/bash | |
userName="John Doe" | |
emails=( | |
"john@doe.com" | |
"john.doe@freelance.com" | |
"john.doe@acme.com" | |
) | |
if [[ $1 =~ ^[1-9][0-9]*$ ]] |
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
<mjml> | |
<mj-head> | |
<mj-attributes> | |
<mj-all font-family="Helvetica"></mj-all> | |
</mj-attributes> | |
</mj-head> | |
<mj-body background-color="#f6f6f6"> | |
<mj-raw> | |
{% trans_default_domain 'email' %} | |
<!-- Company Header --> |