Skip to content

Instantly share code, notes, and snippets.

View lyrixx's full-sized avatar
😀

Grégoire Pineau lyrixx

😀
View GitHub Profile
@lyrixx
lyrixx / Queue.php
Last active March 15, 2019 14:56
PHP async queue (Process (or not))
<?php
class Queue
{
private $size;
private $onJobStart;
private $isJobRunning;
private $onJobFinish;
private $queued;
<?php
<<<CONFIG
packages:
- "kriswallsmith/buzz: ^0.15.0"
- "symfony/console: ^3.2@dev"
CONFIG;
// Find you token on https://api.slack.com/docs/oauth-test-tokens
use Buzz\Message\Response;
@lyrixx
lyrixx / barcode.php
Created November 20, 2015 18:42
Barcode
<?php
<<<CONFIG
packages:
- "zendframework/zend-barcode: ^2.5"
- "symfony/console: ^2.7"
CONFIG;
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Helper\QuestionHelper;
@lyrixx
lyrixx / VersionCalculator.php
Last active August 29, 2015 14:18
VersionCalculator
<?php
namespace SensioLabs\Toolkit\Assets;
use Assetic\AssetManager;
use Assetic\Asset\AssetCollection;
use Symfony\Component\Finder\Finder;
class VersionCalculator
{
@lyrixx
lyrixx / .gitignore
Last active August 29, 2015 14:17
phpunit error
/vendor/
@lyrixx
lyrixx / symfony-and-melody.php
Last active August 29, 2015 14:13
Symfony in a single file, for melody
<?php
<<<CONFIG
packages:
- "symfony/symfony: 2.7.x-dev@dev"
CONFIG;
use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Config\Loader\LoaderInterface;
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
@lyrixx
lyrixx / melody.php
Created December 5, 2014 22:22
Melody demo
<?php
<<<CONFIG
packages:
- "symfony/finder: ~2.5"
CONFIG;
$finder = Symfony\Component\Finder\Finder::create()
->in(__DIR__)
->name('*.php')
;
@lyrixx
lyrixx / test.php
Last active August 29, 2015 14:07
test melody
<?php
<<<CONFIG
packages:
- "twig/twig: *"
CONFIG;
echo "----------------------------------\n";
$twig = new Twig_Environment(new Twig_Loader_Array(array(
'my_template' => 'Hello {{ name }}',
@lyrixx
lyrixx / monolog.lua
Last active August 29, 2015 14:07
Monolog.lua
-- Sample input:
-- {
-- "message": "Reloading user from user provider.",
-- "context": [
-- ],
-- "level": 100,
-- "level_name": "DEBUG",
-- "channel": "security",
-- "datetime": {
-- "date": "2014-05-23 14:19:19",
@lyrixx
lyrixx / keybase.md
Created September 22, 2014 16:08
keybase.md

Keybase proof

I hereby claim:

  • I am lyrixx on github.
  • I am lyrixx (https://keybase.io/lyrixx) on keybase.
  • I have a public key whose fingerprint is EBD3 7A8B 0142 8B8F CFBE 0159 4F0F C894 7EAE A13A

To claim this, I am signing this object: