Skip to content

Instantly share code, notes, and snippets.

View MattKetmo's full-sized avatar

Matt Ketmo MattKetmo

View GitHub Profile
@MattKetmo
MattKetmo / some_mail.html.twig
Created June 1, 2012 14:56
TwigMailGenerator + embed tag
{% block subject 'Hello World' %}
{% block body_html %}
{% embed "layout_mail.html.twig" %}
{% block content %}
I'm the <b>content</b>.
{% endblock %}
{% endembed %}
{% endblock %}
@MattKetmo
MattKetmo / FacebookSessionPersistence.php
Created May 25, 2012 08:10
Quick (and dirty) fix for running tests using FosFacebookBundle
<?php
namespace Foo\BarBundle\Facebook;
use FOS\FacebookBundle\Facebook\FacebookSessionPersistence as BaseFacebookSessionPersistence;
use Symfony\Component\HttpFoundation\Session\Session;
/**
* Quick (and dirty) fix for running tests using FosFacebookBundle.
* It may have unwanted consequences (not tested)!
@MattKetmo
MattKetmo / StreamedProcessResponse.php
Created May 20, 2012 17:57
StreamedProcessResponse
<?php
use Symfony\Component\HttpFoundation\StreamedResponse;
use Symfony\Component\Process\Process;
class StreamedProcessResponse extends StreamedResponse
{
public function __construct(Process $process, $status = 200, $headers = array())
{
$callback = function() use ($process) {