Skip to content

Instantly share code, notes, and snippets.

View Romain's full-sized avatar

Romain Biard Romain

View GitHub Profile
@soyHouston256
soyHouston256 / install_phpzip.md
Created October 21, 2020 15:51 — forked from yehgdotnet/install_phpzip.md
MAMP PRO for Mac OSX - Installing PHP ZIP extension

From Terminal

# install dependencies
brew install autoconf # required by pecl 
brew install libzip


# install zip extenion in your selected MAMP PHP version 
ls /Applications/MAMP/bin/php/
@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;
@leepowers
leepowers / wpseo-yoast-sitemap-custom.php
Last active March 28, 2024 05:19
WordPress Yoast SEO: Create a custom sitemap with data not sourced from a custom post type.
<?php
/**
* USAGE:
* - Search and replace the `CUSTOM_SITEMAP` string with a lowercase identifier name: e.g., "vehicles", "customer_profiles"
* - The `your_alternate_data_source()` function does not exist; it's simply a placeholder for your own function that returns some sort of data array.
* - Uses heredocs for inline XML: https://www.php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc
*/
/**
@hexablob
hexablob / guide-installation-debian.md
Last active March 19, 2023 16:06
Installation d'un serveur Debian ; de A à Z.

Installation d'un serveur Debian ; de A à Z.

⚙️ Installation & Configuration du système d'exploitation

La première étape consiste à sélectionner la distribution système Debian 10 dans le menu déroulant lors de la commande de votre nouveau Serveur dédié / VPS chez votre hébergeur préféré.

Procédez ensuite à l'installation de votre serveur avec les paramètres par défaut et veillez à ne pas personnaliser la répartition de l'espace disque des partitions systèmes.

Une fois l'installation effectuée, connectez-vous au serveur en SSH avec les identifiants que vous aurez normalement reçus par mail (en toute logique le login par défaut est debian, s'il ne s'agit pas là dans certains cas des identifiants root.) -- pas de soucis, l'utilisateur par défaut fait dans une grande majorité des cas déjà parti des sudoers système. --

@markreid
markreid / gitflowrebasing.md
Created January 17, 2017 04:30
git flow with rebasing
***
*** Inscrivez vous aux webinaires 2017 : https://attendee.gotowebinar.com/register/7239291589398918401
***
Webinaire "Présentation des principaux services AWS" :
https://www.youtube.com/watch?v=FC--jteXU_8
http://www.slideshare.net/JulienSIMON5/presentation-des-services-aws
Webinaire "Modèle de sécurité AWS" :
https://www.youtube.com/watch?v=1QeKH-5nTIc
@spalladino
spalladino / mysql-docker.sh
Created December 22, 2015 13:47
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
@oilvier
oilvier / bookmark.js
Last active February 14, 2024 10:29
Javascript to add a bookmark - Cross Browser
/**
*
* Add to bookmark
* Several tests are necessary in order for this "simple" action to work in most of the browsers
*
*/
// First, we define the element where the "Add to bookmark" action will trigger
var triggerBookmark = $(".js-bookmark"); // It must be an `a` tag
@dylancwood
dylancwood / tree.css
Last active April 29, 2024 15:48
CSS to create a simple tree structure with connecting lines. No images or JS required.
ul.tree, ul.tree ul {
list-style: none;
margin: 0;
padding: 0;
}
ul.tree ul {
margin-left: 10px;
}
ul.tree li {
margin: 0;