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 A.reference, B.lastname, A.total_paid_tax_incl, A.date_add, C.name,D.* | |
FROM ps_orders A | |
INNER JOIN ps_customer B ON B.id_customer = A.id_customer | |
INNER JOIN ps_carrier C ON C.id_carrier = A.id_carrier | |
LEFT OUTER JOIN ps_socolissimo_delivery_info D ON D.id_cart = A.id_cart | |
WHERE A.date_add BETWEEN '2017-06-01' AND '2017-09-31' | |
# AND C.name IN ('Colissimo Suivi International','Colissimo Suivi Europe') | |
# AND A.total_paid_tax_incl <= 50 | |
# AND C.name <> 'Colissimo Suivi International' | |
# AND D.cecountry NOT IN ('AT', 'BE') |
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 | |
#Regle a rajouter pas loin de RewriteEngine on | |
RewriteCond "%{HTTP_REFERER}" "site_a_bloquer.com" [NC] | |
RewriteRule \.(gif|GIF|jpg|JPG|bmp|BMP|jpeg|JPEG|png|PNG)$ http://hotfirenfw.cluster014.ovh.net/Je-suis-un-gros-encule.gif [L,R] |
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
# /etc/nginx/conf.d/default.conf | |
# NEED https://gist.github.com/Hotfirenet/0d5fc63204ecf8f0022294c0825ab408 | |
server { | |
listen 80 default_server; | |
listen [::]:80 default_server ipv6only=on; | |
... | |
if ($bad_referer) { |
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
map $http_referer $bad_referer { | |
hostnames; | |
default 0; | |
# Put regexes for undesired referers here | |
"~site_a_bloquer.com" 1; | |
} |
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 COUNT(id_order) AS nbOrder | |
, SUM(total_paid_tax_incl) AS 'CA_TTC' | |
, DATE(date_add) AS 'Date' | |
, payment | |
FROM ps_orders | |
WHERE YEAR(date_add) = 2017 | |
GROUP BY DATE(date_add), payment |
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 |
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 | |
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
<?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 |