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
ps ax|grep -i docker|egrep -iv 'grep|com.docker.vmnetd'|awk '{print $1}'|xargs kill |
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 | |
function emailObfuscation(string $email) { | |
return preg_replace_callback('/./', function($m) use ($email) { | |
return '&#' . ord($m[0]) . ';'; | |
}, $email); | |
} | |
echo emailObfuscation('[email protected]'); |
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
SELECT | |
c.id_customer, | |
c.firstname, | |
c.lastname, | |
c.email, | |
c.active, | |
c.newsletter, | |
c.optin, | |
c.date_add, | |
gl.name as social_title, |
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 | |
$path = DIRECTORY_SEPARATOR . 'path' . DIRECTORY_SEPARATOR . 'folder'; | |
$denies = array('..', '.'); | |
$entries = array_diff(scandir($path), $denies); | |
foreach ($entries as $key => $file_or_folder) { | |
if (!is_dir($path . DIRECTORY_SEPARATOR . $file_or_folder)) { | |
unset($entries[$key]); | |
} | |
} |
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
<script type="module"> | |
// NOTE: You literally don't need a build process with preact. | |
import { h, Component, render } from 'https://unpkg.com/preact?module'; | |
const app = h('h1', null, 'Hello World!'); | |
render(app, document.body); | |
</script> | |
<script type="module"> | |
// https://www.skypack.dev/ | |
import confetti from 'https://cdn.skypack.dev/canvas-confetti'; |
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
RewriteEngine On | |
RewriteCond %{HTTPS} off [OR] | |
RewriteCond %{HTTP_HOST} !^www\.my-site\.com$ [NC] | |
RewriteRule ^(.*)$ https://www.my-site.com/$1 [L,R=301] |
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
# Installer d'autres langues via wpcli | |
wp language core install fr_FR | |
# Changer de langue | |
wp site switch-language fr_FR |
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
RewriteEngine On | |
RewriteBase / | |
RewriteRule ^(wp-content/uploads/.*) https://www.my-web-site.com/$1 [L] | |
# BEGIN WordPress | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteRule ^index\.php$ - [L] | |
RewriteCond %{REQUEST_FILENAME} !-f |
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
{* | |
* Prestashop 1.6 Documentation | |
* http://doc.prestashop.com/display/PS16/Module+translation | |
* https://stackoverflow.com/questions/11340742/pass-a-variable-inside-translation-string-in-prestashop | |
*} | |
{* Translate Back-Office Key *} | |
{l s='This is translation' mod='my_module'} | |
{* Variables *} |
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
Options +FollowSymlinks | |
RewriteEngine on | |
RewriteCond %{REQUEST_URI} !/maintenance.html$ | |
RewriteRule $ /maintenance.html [R=302,L] |
NewerOlder