Skip to content

Instantly share code, notes, and snippets.

View alexislefebvre's full-sized avatar
🐼
🐼 🐼 🐼

Alexis Lefebvre alexislefebvre

🐼
🐼 🐼 🐼
View GitHub Profile
@masseelch
masseelch / FullTextSearchFilter.php
Last active September 19, 2022 19:43
(Kind of a) api-platform full-text search filter.
<?php
namespace App\Filter;
use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\SearchFilter;
use ApiPlatform\Core\Bridge\Doctrine\Orm\Util\QueryNameGeneratorInterface;
use ApiPlatform\Core\Exception\InvalidArgumentException;
use Doctrine\ORM\QueryBuilder;
@faelp22
faelp22 / server.py
Last active March 22, 2023 13:55
Python3 SimpleHTTPServer for Static Serving (VueJS/ React / Angular / Ember) in HTML5 mode (a la mod_rewrite)
#!/usr/bin/env python
'''
Based on https://gist.github.com/chrisbolin/2e90bc492270802d00a6
'''
import os
from http.server import HTTPServer, SimpleHTTPRequestHandler
from urllib.parse import urlparse
@vudaltsov
vudaltsov / FixPostgreSQLDefaultSchemaListener.php
Last active March 3, 2024 10:08
Doctrine PostgreSQL Default Schema Fix For Symfony
<?php
declare(strict_types=1);
namespace App\Doctrine\EventListener;
use Doctrine\DBAL\Schema\PostgreSQLSchemaManager;
use Doctrine\ORM\Tools\Event\GenerateSchemaEventArgs;
final class FixPostgreSQLDefaultSchemaListener
@axelvnk
axelvnk / OrSearchFilter.php
Last active April 3, 2024 23:07
Api platform OR search filter
<?php
namespace Axelvkn\AppBundle\Filter;
use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\SearchFilter;
use ApiPlatform\Core\Bridge\Doctrine\Orm\Util\QueryNameGeneratorInterface;
use ApiPlatform\Core\Exception\InvalidArgumentException;
use Doctrine\ORM\QueryBuilder;
class OrSearchFilter extends SearchFilter
@johndatserakis
johndatserakis / install-imagick-docker-php-7-1-alpine.md
Last active December 7, 2023 12:01
Install imagick In Docker FROM php:7.1-fpm-alpine

docker-library/php#105

RUN set -ex \
    && apk add --no-cache --virtual .phpize-deps $PHPIZE_DEPS imagemagick-dev libtool \
    && export CFLAGS="$PHP_CFLAGS" CPPFLAGS="$PHP_CPPFLAGS" LDFLAGS="$PHP_LDFLAGS" \
    && pecl install imagick-3.4.3 \
    && docker-php-ext-enable imagick \
    && apk add --no-cache --virtual .imagick-runtime-deps imagemagick \
 &amp;&amp; apk del .phpize-deps
@d0x2f
d0x2f / .drone.yml
Last active August 17, 2021 22:18
.drone.yml example
workspace:
base: /build
pipeline:
dbnode1:
detach: true
image: mysql/mysql-cluster:7.5
commands:
- sleep 5
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active May 10, 2024 20:54
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@egmontkob
egmontkob / Hyperlinks_in_Terminal_Emulators.md
Last active May 9, 2024 20:00
Hyperlinks in Terminal Emulators
@joyrexus
joyrexus / README.md
Last active February 24, 2024 15:16
collapsible markdown

collapsible markdown?

CLICK ME

yes, even hidden code blocks!

print("hello world!")
@Charlie-Lucas
Charlie-Lucas / my.cnf
Created November 8, 2016 09:15
/etc/mysql/my.cnf
[mysqld]
sql-mode=""