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
#suppression de la metabox yoast seao sur un custom post type | |
add_action( 'add_meta_boxes', function() { | |
remove_meta_box('wpseo_meta', 'mycustomposttype', 'normal'); | |
},11 ); |
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
tell application "Finder" | |
set chemin to choose folder with prompt "Sélectionnez le dossier contenant les fichiers à renommer" | |
my inspecter(chemin) --appel routine avec transmission des variables | |
end tell | |
on inspecter(un_dossier) | |
-- récupération du nom du dossier | |
set ledossier to un_dossier as string | |
set ledossier to text 1 thru -2 of ledossier | |
set AppleScript's text item delimiters to {":"} |
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 reference FROM ps_product P | |
INNER JOIN ps_product_lang PL ON PL.id_product = P.id_product | |
WHERE P.active = 1 AND (PL.available_now IS NOT NULL AND PL.available_now <> '') | |
GROUP BY reference |
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
/* Find on http://ready2gosoft.com/php/mysql-generate-random-string.html | |
USE SELECT genstring(ROUND((RAND() * (128-1))+1)); | |
USE SELECT CONCAT(genstring(ROUND((RAND() * (30-5))+5)), '@', genstring(ROUND((RAND() * (30-5))+5)), '.', genstring(ROUND((RAND() * (5-2))+2))); | |
*/ | |
DROP function if exists genstring; | |
delimiter $$ | |
CREATE FUNCTION genstring(in_strlen int) RETURNS VARCHAR(500) DETERMINISTIC | |
BEGIN |
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
/* NEED https://gist.github.com/Hotfirenet/6059aa528800c1bb944fa5b7d8fcbf42 */ | |
TRUNCATE TABLE ps_connections; | |
TRUNCATE TABLE ps_connections_page; | |
TRUNCATE TABLE ps_connections_source; | |
TRUNCATE TABLE ps_customer_ip; | |
TRUNCATE TABLE ps_customer_message; | |
TRUNCATE TABLE ps_customer_thread; | |
TRUNCATE TABLE ps_mail; | |
TRUNCATE TABLE ps_message; |
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 | |
/* | |
* Sources: | |
* http://blog.dev-net.fr/ajoutez-vos-propres-fonctions-a-smarty-depuis-un-module-prestashop/ | |
* http://www.smarty.net/forums/viewtopic.php?p=23628#23628 | |
*/ | |
if (!defined('_PS_VERSION_')) | |
exit; | |
class extend_prestashop_smarty extends Module |
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
#!/usr/bin/env bash | |
docker rm $(docker ps -a -q) | |
docker rmi $(docker images -q) |
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
// Use [collaborateurs][/collaborateurs] | |
add_shortcode( 'collaborateurs', function () { | |
$search = "/@hotfirenet\.com$/i"; | |
$html = '<div id="collaborateurs" class="items">'; | |
//$users = get_users(); | |
$args = array( |
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
#!/usr/bin/env bash | |
for f in *.jpg | |
do | |
mv -n "$f" "$(exiftool -d "%Y%m%d_%H%M%S" -CreateDate "$f" | awk '{print $4".jpg"}')" | |
done |