Skip to content

Instantly share code, notes, and snippets.

View lyrixx's full-sized avatar
😀

Grégoire Pineau lyrixx

😀
View GitHub Profile
@lyrixx
lyrixx / CHANGELOG-3.0.md
Last active February 23, 2024 14:36
Symfony CHANGELOG

Bridge/Doctrine

  • removed EntityChoiceList
  • removed $manager (2nd) and $class (3th) arguments of ORMQueryBuilderLoader
  • removed passing a query builder closure to ORMQueryBuilderLoader
  • removed loader and property options of the DoctrineType

Bridge/Monolog

  • deprecated interface Symfony\Component\HttpKernel\Log\LoggerInterface has been removed
@lyrixx
lyrixx / README.md
Last active February 21, 2020 13:51
Add shared tracks in to slack to a Spotify Playlist
@lyrixx
lyrixx / README.md
Last active March 17, 2020 16:34
Spotify does not handle Media Keys

Debug media keys and Spotify

TL;DR: There is a bug in gnome that have been fixed in 3.3. But you can temporary fix this issue with: pkill gsd-media-keys

Let's Debug

  1. We check logs

@lyrixx
lyrixx / .gitignore
Last active July 28, 2023 14:13
UUID generation in PHP
/vendor/
@lyrixx
lyrixx / HardCoreDebugLogger.php
Last active April 27, 2024 14:09
Hardcore Debug Logger
<?php
const STREAM_OPEN_FOR_INCLUDE = 128;
final class HardCoreDebugLogger
{
public static function register(string $output = 'php://stdout')
{
register_tick_function(function () use ($output) {
$bt = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1);
@lyrixx
lyrixx / run.php
Last active November 9, 2023 13:51
Updated your templates with the new twig include
<?php
<<<CONFIG
packages:
- "symfony/finder: ~3.0"
- "symfony/console: ~3.0"
CONFIG;
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
@chanmix51
chanmix51 / arrays_in_bash.md
Last active April 2, 2020 18:26
Using arrays in Bash

Using arrays in bash

creating an array

$> my_array=(one two three)

accessing/setting elements

$> echo ${my_array}

one

@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;
@qhwa
qhwa / go_port_forwarding.go
Last active March 27, 2024 13:17
network port forwarding in go lang
package main
import (
"fmt"
"io"
"net"
)
func main() {
ln, err := net.Listen("tcp", ":8080")