Skip to content

Instantly share code, notes, and snippets.

View thierrypigot's full-sized avatar

Thierry Pigot thierrypigot

View GitHub Profile
@thierrypigot
thierrypigot / vlc.cnf
Created April 18, 2024 09:20
Exemples de configuration VCL
sub vcl_recv {
# Ne pas mettre en cache lorsque les cookies de session sont présents
if (req.http.cookie ~ "PHPSESSID") {
return (pass);
}
}
@thierrypigot
thierrypigot / .htaccess
Created April 18, 2024 08:34
désactiver XML-RPC en ajoutant quelques lignes de code dans le fichier .htaccess
# Block WordPress xmlrpc.php requests
<Files xmlrpc.php>
order deny,allow
deny from all
</Files>
@thierrypigot
thierrypigot / index.html
Created December 22, 2015 21:45
Embed external website in full size iframe
<!doctype html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<title>Soref Dictator</title>
<script src="https://code.jquery.com/jquery-2.1.4.min.js" type="text/javascript"></script>
<script>
//function to fix height of iframe!
@thierrypigot
thierrypigot / .htaccess
Created September 19, 2023 15:54
Désactivation de la publication via XML-RPC
<Files xmlrpc.php>
order deny,allow
deny from all
</Files>
@thierrypigot
thierrypigot / wp-config.php
Created September 19, 2023 15:53
Forcer l'utilisation de SSL
<?php
define('FORCE_SSL_ADMIN', true);
@thierrypigot
thierrypigot / .htaccess
Created September 19, 2023 15:52
Protection du fichier wp-config.php
<files wp-config.php>
order allow,deny
deny from all
</files>
@thierrypigot
thierrypigot / wp-config.php
Created September 19, 2023 15:51
Désactivation de l'édition de fichier
<?php
define('DISALLOW_FILE_EDIT', true);
SELECT *
FROM wp_posts
WHERE post_title = "Mon titre d'article"
AND post_status = 'publish'
@thierrypigot
thierrypigot / scripts.js
Last active July 6, 2023 19:26
[Beaver Builder] Highlight menu links on a One Page with anchor links and sections detection on scroll
(function($){
$(document).ready(function(){
/**
* This part handles the highlighting functionality.
* We use the scroll functionality again, some array creation and
* manipulation, class adding and class removing, and conditional testing
*/
var aChildren = $("header ul.menu li").children(); // find the a children of the list items
@thierrypigot
thierrypigot / archive.php
Created June 27, 2023 15:29
WordPress loop
<?php
if ( have_posts() ) :
while ( have_posts() ) : the_post();
// Display post content
endwhile;
endif;
?>