Skip to content

Instantly share code, notes, and snippets.

Joeri Verdeyen jverdeyen

Block or report user

Report or block jverdeyen

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
@jverdeyen
jverdeyen / QueueController.php
Last active Feb 21, 2018
Enqueue Symfony Console commands [QueueController.php]
View QueueController.php
<?php
namespace AppBundle\Controller;
use AppBundle\Model\Queue\QueuedCommand;
use AppBundle\Service\Queue\QueuedCommandHandler;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Response;
@jverdeyen
jverdeyen / services.yml
Created Feb 13, 2018
Enqueue Symfony Console commands [services.yml]
View services.yml
services:
AppBundle\Service\Queue\QueuedCommandHandler:
arguments:
$env: "%kernel.environment%"
AppBundle\Service\Queue\Processor\RunCommandProcessor:
arguments:
- "%kernel.project_dir%"
tags:
- { name: 'enqueue.client.processor', topicName: 'run_command' }
@jverdeyen
jverdeyen / RunCommandProcessor.php
Created Feb 13, 2018
Enqueue Symfony Console commands [RunCommandProcessor.php]
View RunCommandProcessor.php
<?php
namespace AppBundle\Service\Queue\Processor;
use Enqueue\Client\CommandSubscriberInterface;
use Enqueue\Consumption\Result;
use Interop\Queue\PsrContext;
use Interop\Queue\PsrMessage;
use Interop\Queue\PsrProcessor;
use Symfony\Component\Process\Exception\ProcessFailedException;
@jverdeyen
jverdeyen / QueuedCommandHandler.php
Last active Feb 21, 2018
Enqueue Symfony Console commands [QueuedCommandHandler.php]
View QueuedCommandHandler.php
<?php
namespace AppBundle\Service\Queue;
use AppBundle\Model\Queue\QueuedCommand;
use Enqueue\Client\ProducerInterface;
class QueuedCommandHandler
{
/**
@jverdeyen
jverdeyen / QueuedCommand.php
Last active Feb 14, 2018
Enqueue Symfony Console commands [QueuedCommand.php]
View QueuedCommand.php
<?php
namespace AppBundle\Model\Queue;
class QueuedCommand
{
/**
* @var string
*/
private $name;
@jverdeyen
jverdeyen / config.yml
Last active Feb 14, 2018
Enqueue Symfony Console commands [config.yml]
View config.yml
parameters:
persistent_cache_dir: /tmp
app_name: ProjectX
enqueue:
transport:
default: 'fs'
fs:
dsn: "file://%persistent_cache_dir%/"
path: "./enqueue" // The directory where all queue\topic files remain.
@jverdeyen
jverdeyen / QueuedCommand.php
Last active Feb 13, 2018
Enqueue Symfony Console commands
View QueuedCommand.php
<?php
namespace AppBundle\Model\Queue;
class QueuedCommand
{
/**
* @var string
*/
private $name;
View .editorconfig
root = true
[*]
end_of_line = LF
insert_final_newline = true
trim_trailing_whitespace = true
charset = utf-8
[*.{php,yml,sh,feature}]
indent_style = space
@jverdeyen
jverdeyen / .docker-alias.bash
Created Aug 9, 2016
A set of docker aliases
View .docker-alias.bash
# ------------------------------------
# Docker alias and function
# ------------------------------------
# Get latest container ID
alias dl="docker ps -l -q"
# Get container process
alias dps="docker ps"
@jverdeyen
jverdeyen / .php_cs.php
Last active Feb 26, 2019
A default php-cs configuration
View .php_cs.php
<?php
return Symfony\CS\Config\Config::create()
->level(Symfony\CS\FixerInterface::SYMFONY_LEVEL)
->fixers([
'concat_with_spaces',
'multiline_spaces_before_semicolon',
'short_array_syntax',
'newline_after_open_tag',
'single_quote',
You can’t perform that action at this time.