Skip to content

Instantly share code, notes, and snippets.

View keybase.md

Keybase proof

I hereby claim:

  • I am ricbra on github.
  • I am rvandenbrand (https://keybase.io/rvandenbrand) on keybase.
  • I have a public key ASA7kFcUn-QqIl6haLwzuDYD5OSQFffTJcshlzljgvNpHwo

To claim this, I am signing this object:

View gist:b55936f395cbf7a63840
Verifying that +ricbra is my blockchain ID. https://onename.com/ricbra
@ricbra
ricbra / gist:b683f95321bf50bc649e
Last active Nov 11, 2015
Install Debian on a MacBook Pro (10,1)
View gist:b683f95321bf50bc649e
For the fans: https://ineed.coffee/projects/mbpfan/
sudo cp mbpfan.service /usr/lib/systemd/system
sudo cp mbpfan.service /etc/systemd/system/mbpfan.service
sudo systemctl daemon-reload
sudo systemctl start mbpfan.service
sudo systemctl enable mbpfan.service
in /etc/rc.local
setpci -v -H1 -s 00:01.00 BRIDGE_CONTROL=0
@ricbra
ricbra / CategoryType.php
Last active Aug 29, 2015
Translate Entity field labels
View CategoryType.php
<?php
namespace Bkv\Bundle\LbwBundle\Form\Type;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Translation\Translator;
use Symfony\Component\Validator\Constraints\NotBlank;
class CategoryType extends AbstractType
{
@ricbra
ricbra / hack.php
Created Aug 14, 2015
How to set violation with array
View hack.php
<?php
namespace SmaakEnSensatie\Validator;
use Symfony\Component\Validator\Constraint;
use Symfony\Component\Validator\ConstraintValidator;
class DeliveryValidator extends ConstraintValidator
{
public function validate($value, Constraint $constraint)
View FailsafeQueueFlusher.php
<?php
/*
* (c) Waarneembemiddeling.nl
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Wb\Bundle\CoreBundle\SwiftMailer;
View Doctrine.php
\Doctrine\DBAL\Types\Type::addType('uuid', 'BuboBox\Doctrine2\DBAL\Types\UuidType');
View PoolControllerSpec.php
<?php
namespace spec\Wb\PoolBundle\Controller;
use Broadway\CommandHandling\CommandBusInterface;
use Broadway\ReadModel\RepositoryInterface;
use Broadway\UuidGenerator\UuidGeneratorInterface;
use Netvlies\WbBundle\Entity\EntityGroupRepository;
use PhpSpec\ObjectBehavior;
use Prophecy\Argument;
View MemberIsNotBanned.php
<?php
/*
* (c) Waarneembemiddeling.nl
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Wb\Pool\Model\Member;
View CoreContext.php
/**
* @When /^I click on toolbox item "([^"]*)"$/
*/
public function iClickOnToolBoxItem($locator)
{
$session = $this->getSession();
$page = $session->getPage();
$toolbox = $page->find('css', '.toolbox');
$nodes = $page->findAll('css', "a:contains('Versturen')");