Skip to content

Instantly share code, notes, and snippets.


Joeri Timmermans pix-art

View GitHub Profile
pix-art / TimeoutContext.php
Created Jul 28, 2017
A timeout context to help you when you have to wait for elements on your page
View TimeoutContext.php
namespace FrontendBundle\Features\Context;
use Behat\Behat\Hook\Scope\BeforeScenarioScope;
use Behat\Mink\Exception\ElementNotFoundException;
use Behat\Mink\Exception\ElementTextException;
use Behat\Mink\Exception\ResponseTextException;
use Behat\MinkExtension\Context\RawMinkContext;
class TimeoutContext extends RawMinkContext
View Global branch cleanup git
1. Create somewhere with the following code:
git branch --merged | egrep -v "(^\*|master|dev)" | xargs git branch -d
2. Create global alias for that file:
git config --global alias.cleanup '!sh <location of your file>/'
3. Checkout to your develop or master and run:
View gist:99c565a59f5ce6ecaa2d
$query = $this->em->getConnection()->createQueryBuilder()
->from('asset', 'a');
if ($type) {
$query->andWhere('a.type = :type')
->setParameter('type', $type);
$assets = $query->execute()->fetchAll();
pix-art / pre-commit
Created Nov 27, 2015
Pre commit hook that runs php-cs-fixer on your src folder (Symfony2)
View pre-commit
BASE=$(git rev-parse --show-toplevel)
php-cs-fixer self-update
php-cs-fixer fix $BASE/src/ --level=symfony
pix-art / FakerContext.php
Last active Oct 12, 2015
Custom faker context with extra logging on failure
View FakerContext.php
namespace FrontendBundle\Features\Context;
use Behat\Behat\Hook\Scope\AfterScenarioScope;
use Behat\Gherkin\Node\TableNode;
use Behat\Symfony2Extension\Context\KernelAwareContext;
use Behat\Symfony2Extension\Context\KernelDictionary;
use Faker\Factory as FakerFactory;
View Bash History

##Open .inputrc

sudo vim ~/.inputrc

##Paste the following

"\e[A": history-search-backward
"\e[B": history-search-forward
View JMeter Server-Client setup with

##1. Setup docker



##2. Setup docker-machine