Skip to content

Instantly share code, notes, and snippets.

View Nolwennig's full-sized avatar
🐘
Focusing

Nolwennig Nolwennig

🐘
Focusing
View GitHub Profile
Le juge donne avis de l'ouverture de la procédure au procureur de la République ; quand ils ne sont pas requérants, il en donne également avis à chacun des parents, au tuteur, à la personne ou au représentant du service à qui l'enfant a été confié.
Il entend chacun des parents, le tuteur, la personne ou le représentant du service à qui l'enfant a été confié et le mineur capable de discernement et porte à leur connaissance les motifs de sa saisine.
Il entend toute autre personne dont l'audition lui paraît utile.
L'avis d'ouverture de la procédure et les convocations adressées aux parents, au tuteur, à la personne ou au représentant du service à qui l'enfant a été confié et au mineur mentionnent les droits des parties de faire choix d'un conseil ou de demander qu'il leur en soit désigné un d'office conformément aux dispositions de l'article 1186. L'avis et les convocations informent les parties de la possibilité de consulter le dossier conformément aux dispositions de l'article 1187.
@Nolwennig
Nolwennig / .bashrc
Created July 24, 2024 13:46
Magento 2 system management shortcuts
# Perso
alias bashrc="nano ~/.bashrc && source ~/.bashrc"
# Magerun2
alias magerun2="php /var/www/docroot/bin/n98-magerun2.phar"
alias m2="magerun2"
alias msu="m2 setup:upgrade"
alias mdi="m2 setup:di:compile"
alias mstatic="m2 setup:static-content:deploy -f"
alias mcclean="m2 cache:clean"
@Nolwennig
Nolwennig / delete_wp_revisions.sql
Last active April 12, 2023 08:43
This query deletes all post revisions that were modified more than 30 days ago from the current date. Note that this query can potentially delete a large number of revisions, so be sure to back up your data before running it.
DELETE FROM wp_posts
WHERE post_type = 'revision'
AND post_modified < DATE_SUB(NOW(), INTERVAL 30 DAY);
@Nolwennig
Nolwennig / color_headings.js
Created February 14, 2023 14:13
color each h2-h6 from DOM with a dotted border
let headings = document.querySelectorAll('h2, h3, h4, h5, h6');
for (let i = 0; i < headings.length; i++) {
let heading = headings[i];
let level = parseInt(heading.tagName.charAt(1));
let color;
switch (level) {
case 2:
color = "red";
break;
case 3:
@Nolwennig
Nolwennig / xdebug_lastest_version.sh
Created July 1, 2022 15:21
Get lastest tags version number from Xdebug
git ls-remote --tags https://github.com/xdebug/xdebug.git | grep -vE 'refs/tags/XDEBUG|{}' | tail -n1 | cut -d'/' -f3
# todo
# Inspired from https://gist.github.com/Nolwennig/57156f68d2aab1931e863a029cbf5dc0
# commmand list all containers docker
docker ps -a
# command to shown docker active
docker ps
# diff beetween active and all containers
# with the diff result pipe to sed to retrieve only container id
# use container ids result feed docker rm command
@Nolwennig
Nolwennig / readme.md
Last active August 26, 2021 10:40
Magento adminhtml - Wysiwyg editor with microdata tagging support

Magento adminhtml

Editeur Wysiwyg supportant le balisage microdata

Actuellement comme éditeur de texte dans le back-office, nous avons :

  • Tiny mce 3.5.11 sur catalog
  • Redactor v10.1.2 dans le module mage_pleasure blog

Aucun des deux ne permets de saisir de manière simplifié du contenu microdata.

<!DOCTYPE html>
<html>
<body>
<h1>This is heading 1</h1>
<p>My first paragraph.</p>
<h2>This is heading 2</h2>
<h3>This is heading 3</h3>
@Nolwennig
Nolwennig / OwebiaShippingHelper.php
Created April 21, 2021 10:47
non well formed numeric value
public static function parseSize($size)
{
$strSize = trim($size);
$last = strtolower($strSize[strlen($strSize)-1]);
$size = rtrim($strSize, $last);
switch ($last) {
case 'g': $size *= 1024;
case 'm': $size *= 1024;
case 'k': $size *= 1024;
}
<!DOCTYPE HTML>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
p {
font-family:monospace;
text-align: center;
font-size: 60px;
margin-top: 0px;