Bouts de Code

Petits morceaux de code écrits après de longues recherches, mais que j’ai finalement dû enlever et que je ne veux pas perdre. Principalement ceux ou j’ai du fouiller la documentation et que j’aimerai garder en mémoire.

2024

  • Insert ESM Module as custom script tag with contents with Nuxt v2
    Need to inject custom ESM modules into your Nuxt v2 pages? This guide shows how to properly add client-side ECMAScript modules during build time, going beyond simple static file loading. Perfect for integrating Web Components or other external modules while maintaining full control over script contents and build variables.
    Tags
 

2015

 

2013

  • Encapsulate a LDAP DN string using Arrays in PHP
    While I was writing an authentication and privileges assignation mechanism using information provided by an ActiveDirectory's LDAP DN string into my project's web application, I realized that there was no documented way to extract information from it. This snippet is about reading a complex DN string, and "explode" it into a manageable PHP Array.
    Tags