Skip to content

Instantly share code, notes, and snippets.

View teohhanhui's full-sized avatar

Teoh Han Hui teohhanhui

View GitHub Profile
This post links my 3Box profile to my Github account! Web3 social profiles by 3Box.
✅ did:3:bafyreib7kwhknhuo7ub422wgxrin52de6updss5x7ucc6qzt5k3lx4oo5a ✅
Create your profile today to start building social connection and trust online at https://3Box.io/
@teohhanhui
teohhanhui / OmnipayStripeGatewayConfigurationType.php
Last active June 26, 2019 14:10
Using Omnipay with Sylius (example using Stripe)
<?php
declare(strict_types=1);
namespace AppBundle\Form\Type;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\HiddenType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\FormBuilderInterface;
@teohhanhui
teohhanhui / FilterManager.php
Created April 11, 2018 18:02
Fix SVG in LiipImagineBundle (use together with https://gist.github.com/teohhanhui/90bbc4a61888ad2e92a160d8459db300 to fix MIME type in Symfony)
<?php
declare(strict_types=1);
namespace AppBundle\Imagine\Filter;
use Liip\ImagineBundle\Binary\BinaryInterface;
use Liip\ImagineBundle\Imagine\Filter\FilterManager as BaseFilterManager;
use Liip\ImagineBundle\Model\Binary;
@teohhanhui
teohhanhui / AppKernel.php
Created April 11, 2018 17:55
Fix SVG mime type in Symfony
<?php
declare(strict_types=1);
use AppBundle\HttpFoundation\File\MimeType\ErrataMimeTypeGuesser;
use Symfony\Component\Config\Loader\LoaderInterface;
use Symfony\Component\HttpFoundation\File\MimeType\FileBinaryMimeTypeGuesser;
use Symfony\Component\HttpFoundation\File\MimeType\FileinfoMimeTypeGuesser;
use Symfony\Component\HttpFoundation\File\MimeType\MimeTypeGuesser;
use Symfony\Component\HttpKernel\Kernel;

Keybase proof

I hereby claim:

  • I am teohhanhui on github.
  • I am teohhanhui (https://keybase.io/teohhanhui) on keybase.
  • I have a public key whose fingerprint is 400E 34DB 4EF8 84F6 DED1 5455 7297 83C9 6A30 C9B8

To claim this, I am signing this object: