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
country=FR | |
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev | |
update_config=1 | |
network={ | |
ssid="SSID_LAN" | |
psk="PASSWORD" | |
key_mgmt=WPA-PSK | |
} |
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
# create a network for containers to communicate | |
docker network create prestashop-net | |
# launch latest mysql container | |
docker run -ti --name prestashop-mysql --network prestashop-net -e MYSQL_ROOT_PASSWORD=admin -p 3306:3306 -d mysql:latest | |
# launch prestashop container | |
sudo docker run -ti --name my-prestashop --network prestashop-net -e DB_SERVER=prestashop-mysql -e PS_DOMAIN=maboutique.local -e PS_SHOP_URL=maboutique.local --volume /var/www/html/prestashop:/var/www/html -p 80:80 -d prestashop/prestashop:1.6 | |
# Run mailcatcher | |
sudo docker run -d --name prestashop-mailcatcher --network prestashop-net -p 1080:1080 schickling/mailcatcher |
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
SET @idCustomer = 13377; | |
DELETE CP, P | |
FROM ps_cart_product CP | |
INNER JOIN ps_cart C ON C.id_cart = CP.id_cart | |
WHERE C.id_customer = @idCustomer |
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 | |
#################################################################################### | |
# Slack Bash console script for sending messages. | |
#################################################################################### | |
# Installation | |
# $ curl -s https://gist.githubusercontent.com/andkirby/67a774513215d7ba06384186dd441d9e/raw --output /usr/bin/slack | |
# $ chmod +x /usr/bin/slack | |
#################################################################################### | |
# USAGE | |
# Send message to slack channel/user |
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 | |
/* | |
Plugin Name: HFN test schedule | |
Version: 0.0.1 | |
Plugin URI: http://hotfirenet.com/ | |
Description: Plugin qui test le cron | |
Author: Johan VIVIEN | |
Author URI: http://hotfirenet.com | |
*/ | |
defined( 'ABSPATH' ) or die( 'Cheatin’ uh?' ); |
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 SUM(OD.product_quantity) AS 'OD.product_quantity', | |
OD.product_name, | |
C.firstname, | |
C.lastname, | |
C.email | |
FROM ps_order_detail OD | |
INNER JOIN ps_product P ON P.id_product = OD.product_id | |
LEFT OUTER JOIN ps_orders O ON O.id_order = OD.id_order | |
LEFT OUTER JOIN ps_customer C ON C.id_customer = O.id_customer | |
WHERE P.id_manufacturer = 216 |
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
#!/bin/sh | |
rm -r ~/Library/Application Support | |
rm -r ~/Library/Caches | |
rm -r ~/Library/Google |
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
#!/bin/sh | |
date=$(date +%y-%m-%d) | |
bckdir=REPLACE | |
keep_day=2 | |
container=REPLACE | |
docker exec -ti ${container} mysqldump --login-path=local --single-transaction --all-databases | gzip > "${bckdir}/${container}_${date}.sql.gz | |
find "${bckdir}"/* -mtime +${keep_day} -exec rm {} \; | |
exit 0 |
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
UPDATE ps_affiliate A | |
INNER JOIN | |
( | |
SELECT id_order, SUM(product_quantity) AS nb_article_order | |
FROM ps_order_detail | |
GROUP BY id_order | |
) B | |
ON B.id_order = A.id_order | |
SET A.nb_article_order = B.nb_article_order |
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
git checkout develop | |
git pull origin develop | |
git checkout master | |
git merge develop | |
git push origin master |