Skip to content

Instantly share code, notes, and snippets.

View jverdeyen's full-sized avatar

Joeri Verdeyen jverdeyen

View GitHub Profile
@borestad
borestad / bootstrap.sh
Last active September 2, 2015 06:09
Debian Jessie custom/stripped KVM host with some useful tools (on a Macbook Air)
wget --no-cache -O- https://gist.githubusercontent.com/borestad/ddab79ed5d3412248eed/raw/f7050315505df4287bd54ca514b0a94c7f1848ff/install.sh | /bin/bash
@rnorth
rnorth / samsung_remote.py
Created December 27, 2011 09:20 — forked from danielfaust/samsung_remote.py
Samsung TV Remote Control Python Script
import time
import socket
import base64
src = '192.168.1.2' # ip of remote
mac = '00-AB-11-11-11-11' # mac of remote
remote = 'python remote' # remote name
dst = '192.168.1.3' # ip of tv
app = 'python' # iphone..iapp.samsung
@krispypen
krispypen / gist:4959339
Last active December 13, 2015 18:58
FeatureContext.php snippet
/**
* Take screenshot when step fails.
* Works only with Selenium2Driver.
*
* @AfterStep
*/
public function takeScreenshotAfterFailedStep($event)
{
if (4 === $event->getResult()) {
$driver = $this->getSession()->getDriver();
@weaverryan
weaverryan / FeatureContext.php
Created January 22, 2014 23:27
The Symfony2Extension
<?php
// ...
use Behat\MinkExtension\Context\MinkContext;
use Behat\Symfony2Extension\Context\KernelAwareInterface;
use Symfony\Component\HttpKernel\KernelInterface;
class FeatureContext extends MinkContext implements KernelAwareInterface
{
private $kernel;
@koemeet
koemeet / setup_mac.sh
Created January 27, 2016 17:38
Setup Mac OSX to use vagrant + docker
#!/bin/bash
DOCKER_VERSION=1.9.0
DOCKER_COMPOSE_VERSION=1.5.0
# Console colors
red='\033[0;31m'
green='\033[0;32m'
yellow='\033[1;33m'
NC='\033[0m'
@stof
stof / config.yml
Created June 28, 2012 13:48
FOSJSRoutingBundle with FOSRestBundle
fos_js_routing:
routes_to_expose:
- "^api_.*" # expose all routes with a name starting with api_
@linxlad
linxlad / ManualLogin.php
Created April 17, 2015 16:40
Custom Authentication Class with Symfony 2.6
<?php
/**
* @Author: Nathan Daly
* @Date: 17/04/15
*/
namespace AppBundle\Security;
use Doctrine\ORM\EntityManager;
use Symfony\Component\DependencyInjection\Container;
@SofHad
SofHad / Symfony Exceptions
Last active July 18, 2016 07:06
Symfony Exceptions
Symfony/Component/OptionsResolver/Exception/MissingOptionsException.php
Symfony/Component/OptionsResolver/Exception/OptionDefinitionException.php
Symfony/Component/OptionsResolver/Exception/InvalidOptionsException.php
Symfony/Component/Serializer/Exception/InvalidArgumentException.php
Symfony/Component/Serializer/Exception/UnsupportedException.php
Symfony/Component/Serializer/Exception/UnexpectedValueException.php
Symfony/Component/Serializer/Exception/LogicException.php
Symfony/Component/Serializer/Exception/Exception.php
Symfony/Component/Serializer/Exception/RuntimeException.php
Symfony/Component/HttpKernel/Exception/MethodNotAllowedHttpException.php
@SebLours
SebLours / SoftDeleteableEnabledCommand.php
Last active August 24, 2016 12:54
Show all softdeleteable entities class name (not for annotation config)
<?php
namespace AppBundle\Command;
use Doctrine\Bundle\DoctrineBundle\Command\Proxy\DoctrineCommandHelper;
use Gedmo\Mapping\ExtensionMetadataFactory;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
@SebLours
SebLours / DurationTransformer.php
Created July 5, 2015 13:40
Symfony2 duration datatransformer
<?php
namespace AppBundle\Form\DataTransformer;
use Symfony\Component\Form\DataTransformerInterface;
use Symfony\Component\Form\Exception\TransformationFailedException;
class DurationTransformer implements DataTransformerInterface
{
/**