Skip to content

Instantly share code, notes, and snippets.

View drupol's full-sized avatar

Pol Dellaiera drupol

View GitHub Profile
@drupol
drupol / dependency.svg
Last active August 17, 2021 09:05
Operations dependencies - see https://github.com/loophp/collection for more info
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@drupol
drupol / graphviz.md
Last active September 25, 2021 07:03
Embed GraphViz in Markdown files

Dot2Image

How to embed GraphViz in Markdown

image

More examples:

Use this image in your html page:

@drupol
drupol / functional-anonymous-class.php
Last active October 24, 2021 17:17
Functional anonymous classes in PHP
<?php
/**
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
declare(strict_types=1);
namespace App;
@drupol
drupol / configuration.nix
Last active November 19, 2021 20:11
Nixos issue
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, lib, ... }:
{
imports =
[ # Include the results of the hardware scan.
@drupol
drupol / lyrixx.php
Last active November 25, 2021 21:31
<?php
/**
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Test;
@drupol
drupol / either.php
Last active November 26, 2021 09:26
<?php
declare(strict_types=1);
namespace App;
use Marcosh\LamPHPda\Either;
use Exception;
include __DIR__ . '/vendor/autoload.php';
@drupol
drupol / nix.tex
Created March 17, 2022 15:45
nix lstlisting
\lstdefinelanguage{nix}{
frame = single,
breaklines=true,
aboveskip=1ex,
backgroundcolor=\color{gray!25},
belowskip=1ex,
columns=fullflexible,
framerule=0pt,
framexrightmargin=0em,
framexleftmargin=0em,
@drupol
drupol / flake.nix
Created March 18, 2022 12:37
flake.nix for PHP apps
{
description = "PHP App demo";
inputs.nixpkgs.url = "nixpkgs/nixpkgs-unstable";
inputs.flake-utils.url = "github:numtide/flake-utils";
inputs.phps.url = "github:loophp/nix-shell";
outputs = { self, nixpkgs, flake-utils, phps }: flake-utils.lib.eachDefaultSystem
(system:
let
@drupol
drupol / test-typed-generators.php
Created June 5, 2022 20:18
test-typed-generators.php
<?php
/**
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
declare(strict_types=1);
namespace App;
@drupol
drupol / test.php
Last active June 8, 2022 04:53
loophp/typed-generators test
<?php
declare(strict_types=1);
namespace Snippet;
use Faker\Generator;
use loophp\TypedGenerators\TG;
include __DIR__ . '/vendor/autoload.php';