This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
setlocale(LC_ALL, 'fr_FR') or die('Locale not installed'); | |
//setlocale(LC_ALL, 'en_EN') or die('Locale not installed'); | |
?> | |
<h2>Q1</h2> | |
<?php echo strftime('%A %d %B %Y'); ?> | |
<hr /> | |
<?php echo strftime('%d/%m/%Y %I:%M:%S'); ?> | |
<hr /> | |
<?php echo time(); ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#polaroid-1 .polaroid-img { | |
/* | |
Astuce sur le cacl, il semblerait qu'il faile mutliplier par 1deg pour obtenir une valeur de varaiable en degré | |
Curiseuement, ça ne marche pas avec un + ou -, peut-être que le calcul en deg se fait sur 0 à 360 uniquement | |
*/ | |
--r: calc(calc(var(--visible-y) * 100 * 20 / 100) * 1deg); /* fait une rotation de 180 max */ | |
transform: rotate(var(--r)); | |
} | |
/* |
After a power faliur (also can be a sudden restart or system crash), I ended up with corrupted database and lost the access to my local hosted websites for development. Even the MAMP's MySQL server was not starting.
You will need to find the databases folders, in case of MAMP they are located in Applications/MAMP/db/mysql56
(or mysql57
depending on MySQL version).
You will find folders containing the database name, inside them you will find .frm
and .ibd
files. Take a copy of the entire folder for backup in another place, the desktop for example.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* On court circuite le listener de Divi et on ajoute le nôtre | |
* ici on fait juste un refresh du dom pour que la galerie fonctionne correctement | |
* | |
*/ | |
$(document).off('click', '.et_pb_toggle_title').on('click', '.et_pb_toggle_title', function() { | |
jQuery(window).resize(); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* DON'T copy the first line (above) if your functions.php already has it. | |
* ---------------------------------------------------------------------- */ | |
function my_et_theme_setup() { | |
if ( class_exists( 'ET_Builder_Module_Post_Slider' ) ) { | |
get_template_part( 'my-main-modules' ); | |
add_filter( 'my_et_post_slider_args', 'my_et_post_slider_args_cb' ); | |
$et_pb_post_slider = new My_ET_Builder_Module_Post_Slider(); | |
remove_shortcode('et_pb_post_slider'); |

This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Méthodes pour personnaliser l'admin profil d'un user | |
*/ | |
// Suppression des différentes infos - voir les commentaires par ligne | |
if ( ! function_exists( 'k_remove_personal_options' ) ) { | |
function k_remove_personal_options( $subject ) { | |
$user = wp_get_current_user(); | |
if ( !in_array('editor', $user->roles) ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Permet de filtrer les features d'un layer pour affecter leur parametres */ | |
/* Il est possible avec ça de masquer que les feature.properties.cat = "cat1" */ | |
// https://stackoverflow.com/questions/59181258/how-to-use-mapbox-expressions-to-toggle-layer-class-styles/59185488#59185488 | |
map.setLayoutProperty("points", "icon-image", [ | |
"match", // Si match | |
["get", "id"], // properties.id | |
e.features[0].properties.id, // est égal à une variable passée, ici via un click sur une feature | |
"hu-motorway-2", // On défini l'option "Icon Image" avec cette valeur | |
"hu-main-2", // Si non on utilise celle là |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Snap point (coords param) to roads | |
* The roads depend on the style of the map | |
* @param {Object Mapbox} map | |
* @param {Object feature.geometry.coordinates} coords | |
*/ | |
const snapToRoad = (map, coords) => { | |
// Coordinate to point conversion | |
let currentPoint = turf.point([coords.lng, coords.lat]); | |
// Here we're only retrieving the road layers |