Skip to content

Instantly share code, notes, and snippets.

Sander Marechal sandermarechal

Block or report user

Report or block sandermarechal

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@sandermarechal
sandermarechal / offcanvas.html.twig
Created Jan 13, 2015
foundation off-canvas KnpMenu
View offcanvas.html.twig
{% extends 'knp_menu.html.twig' %}
{% block list %}
{% if item.hasChildren and options.depth is not sameas(0) and item.displayChildren %}
{% import 'knp_menu.html.twig' as knp_menu %}
{% if item.level > 0 %}
{% set listAttributes = listAttributes|merge({'class': (listAttributes.class|default('') ~ ' left-submenu')|trim}) %}
{% else %}
{% set listAttributes = listAttributes|merge({'class': (listAttributes.class|default('') ~ ' off-canvas-list')|trim}) %}
{% endif %}
@sandermarechal
sandermarechal / AbstractTranslation.php
Last active Dec 17, 2015
Design idea for a new Doctrine Translatable extension
View AbstractTranslation.php
<?php
namespace Prezent\Translatable\Entity;
use Doctrine\ORM\Mapping as ORM;
use Prezent\Translatable\Entity\AbstractTranslation;
/**
* @ORM\MappedSuperClass
*/
@sandermarechal
sandermarechal / daemon
Created Mar 5, 2012
PHP problem using passthru() on bash script that uses process replacement
View daemon
#!/bin/bash
# Start daemon, using a syslog file descriptor as logfile
# This causes the phing.php passthru() to hang
./daemon.php >(logger -t daemon.php)
# This will work fine from phing.php
# ./daemon.php out.log
View BarTest.php
<?php
/**
* @group bar
*/
class BarTest extends PHPUnit_Framework_TestCase
{
/**
* @dataProvider spit
*/
You can’t perform that action at this time.