brew install protobuf
brew install grpc
pecl install grpc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Example | |
{ | |
#[ORM\Column(length: 255)] | |
private string $name; | |
#[ORM\Column(length: 255, unique: true)] | |
#[Slug(targetProperty: 'name', unique: true)] | |
private string $slug; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// | |
// Example of implementation of an entity translatable | |
// | |
declare(strict_types=1); | |
namespace App\Entity; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>This is the title of the webpage!</title> | |
<script src="https://js.stripe.com/v3/"></script> | |
<meta name="viewport" content="width=device-width, initial-scale=1" /> | |
</head> | |
<body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once __DIR__.'/../vendor/autoload.php'; | |
use Amp\Loop; | |
Loop::run(function () { | |
$messages = []; | |
function receive(&$messages) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias n14='docker run -it --rm -w "/myvolume" -v "`pwd`:/myvolume" node:14' | |
n14 yarn install | |
n14 node something | |
# Side note: will not work with stuff that need network access such as server. In this case you need to map ports manually. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
********You pressed A |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php declare(strict_types=1); | |
// Ce fichier contient tout un tas de fonctions utile pour faire des opérations spéciales | |
// dans les terminaux. | |
// Lire le contenu des fonctions n'est pas toujours simple car on utilise justement des fonctions pour se simplifier | |
// la vie, leur contenu est souvent donc un peu compliqué à lire. | |
// Mais ici pour les curieux j'ai pris le temps de commenter le code ! | |
// Pour en apprendre plus comment cela fonctionne vous pouvez aller lire ce tutoriel sur ZdS: | |
// https://zestedesavoir.com/tutoriels/1733/termcap-et-terminfo/ | |
// Ou naturellement faire quelques recherches sur internet. ;-) (c'est d'ailleurs principalement ce que j'ai fait) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$bind = ldap_bind($ldap, $username, $password); | |
$res = ldap_search( | |
$ldap, | |
'OU=UTILISATEUR,DC=scaprim,DC=local', | |
// Weirdo syntax to say objetClass must be type user but the username is either | |
// userprincipalname or samaccountname | |
"(&(objectClass=user)(|(userprincipalname=$username)(samaccountname=$username)))" | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Utilisation d'une classe Task pour clarifier mon code précédent à base de tableaux | |
class Task | |
{ | |
protected $taskId; | |
protected $coroutine; | |
protected $sendValue = null; | |
protected $beforeFirstYield = true; |
NewerOlder