Skip to content

Instantly share code, notes, and snippets.

View LaChouetteInformatique's full-sized avatar

Damien BECHERINI LaChouetteInformatique

View GitHub Profile
@LaChouetteInformatique
LaChouetteInformatique / lando.yml
Created June 21, 2024 13:44 — forked from brandonkramer/lando.yml
Lando config file for WordPress with BrowserSync, MailHog, PHPMyAdmin, NGINX and XDebug
# Replace all {project} with project name
name: wp-{project}
recipe: wordpress
config:
php: '7.4'
via: nginx # Nginx or apache
webroot: .
database: mariadb # Mariadb or mysql
xdebug: true
config:
@LaChouetteInformatique
LaChouetteInformatique / WampHTTPS.md
Created April 14, 2023 12:42 — forked from danieldogeanu/WampHTTPS.md
How to enable HTTPS for WAMP Server.

After you've downloaded and installed WAMP Server, follow these steps:

  1. Generate SSL certificate using OpenSSL:
  • Add C:\wamp64\bin\apache\apache2.4.27\bin directory to the PATH so you can access openssl command from the command prompt (WAMP comes with its own version of OpenSSL already integrated, so you don't need to install it. You'll find it in this directory.).

    IMPORTANT: Please note that the path of your installation depends on your version of Apache! DO NOT copy and paste the paths presented in this gist as they will not match with yours!

  • Navigate to your user directory (C:\Users\%YOUR_USERNAME%\), create a new folder (.openssl), navigate to it with Powershell and run these commands:

    openssl genrsa -aes256 -out private.key 2048
    

openssl rsa -in private.key -out private.key

@LaChouetteInformatique
LaChouetteInformatique / functions.php
Created November 24, 2022 10:12 — forked from butlerblog/functions.php
SMTP using wp-config.php for settings #smtp #wp_mail
<?php // Don't use this line.
/*
* Add the script below to wherever you store custom code snippets
* in your site, whether that's your child theme's functions.php,
* a custom plugin file, or through a code snippet plugin.
*/
/**
* This function will connect wp_mail to your authenticated
@LaChouetteInformatique
LaChouetteInformatique / find_callback.php
Created November 24, 2022 10:10 — forked from butlerblog/find_callback.php
#utility for finding callback functions hooked to a specific hook
<?php // do not use this line. Add below to functions.php
add_action( 'wp_footer', 'list_hooked_filters_and_actions' );
add_action( 'login_footer', 'list_hooked_filters_and_actions' );
add_action( 'admin_footer', 'list_hooked_filters_and_actions' );
function list_hooked_filters_and_actions() {
global $wp_filter;
@LaChouetteInformatique
LaChouetteInformatique / custom-queries.php
Created November 24, 2022 10:10 — forked from butlerblog/custom-queries.php
An example plugin showing how to add custom query vars, rewrite tags and rewrite rules to WordPress
<?php
/**
* @package Custom_queries
* @version 1.0
*/
/*
Plugin Name: Custom queries
Plugin URI: http://wordpress.org/extend/plugins/#
Description: This is an example plugin
Author: Carlo Daniele