As configured in my dotfiles.
start new:
tmux
start new with session name:
| <?php | |
| namespace Dot\SkeletonBundle\Doctrine\DBAL\Types; | |
| use Doctrine\DBAL\Platforms\AbstractPlatform; | |
| class CreatedAtType extends DateTimeImmutableUTCType | |
| { | |
| public const NAME = 'created_at'; |
| <?php | |
| namespace App\Doctrine\DBAL\Types; | |
| use Doctrine\DBAL\Platforms\AbstractPlatform; | |
| use Doctrine\DBAL\Types\Type; | |
| class EnumType extends Type | |
| { | |
| public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform) |
| <?php | |
| class Cornicode | |
| { | |
| static public function cornichonize(string $text) { | |
| // Reverse | |
| $cypher = strrev($text); | |
| // Rotate |
| <?php | |
| if (!isset($argv[1])) { | |
| die(sprintf('You forgot to give a template: %s "<prefix> %%s <suffix>"%s', $argv[0], "\n")); | |
| } | |
| $template = $argv[1]; | |
| $raw = file_get_contents('php://stdin'); | |
| $lines = explode(PHP_EOL, $raw); |
| <?php | |
| // ------------------------------------------ | |
| // DEGRADE ( GD ) | |
| // ------------------------------------------ | |
| // --------------------------------------------- | |
| // Allowed GET arguments: | |
| // a -> applies transparency to background color | |
| // c -> colors (use '-' for color separator) |
| <?php | |
| /** | |
| * Cette classe permet d'écrire un document de type plain/text | |
| * formatté en monospace. | |
| * | |
| * Cette classe supporte : | |
| * - les lignes | |
| * - l'alignement | |
| * - les sauts de ligne |
| #!/dgr/bin/busybox sh | |
| # copied from https://github.com/n0rad/rkt-images/blob/master/aci/arch/aci-arch-nginx-certbot/templates/start.tmpl.sh | |
| set -e | |
| . /dgr/bin/functions.sh | |
| isLevelEnabled "debug" && set -x | |
| ## Create certif | |
| # certbot certonly --email [email protected] --webroot -w /var/lib/letsencrypt/ -d domain.tld,sub.domain.tld |
As configured in my dotfiles.
start new:
tmux
start new with session name:
| <?php | |
| $content = file_get_contents('messages.en.xlf'); | |
| /* | |
| Converts crazy xliffs files into readable yaml: | |
| <?xml version="1.0" encoding="utf-8"?> | |
| <xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2"> |
| <?php | |
| # Run me inside a directory full of pictures | |
| # Create an alias for easier use! | |
| date_default_timezone_set('Europe/Paris'); | |
| $path = $_SERVER['PWD']; | |
| $glob = glob("/{$path}/*"); |