Skip to content

Instantly share code, notes, and snippets.

SELECT SUM(A.DL_Qte) AS 'Qte', SUM(A.DL_MontantHT) AS MontantHT, MONTH(A.DO_Date) AS mois, YEAR(A.DO_Date) AS annee, A.AR_Ref, C.TYPECLIENT, E.LI_Pays
FROM dbo.F_DOCLIGNE A
INNER JOIN dbo.F_DOCENTETE D ON D.DO_Piece = A.DO_Piece
INNER JOIN dbo.F_LIVRAISON E ON E.LI_No = D.LI_No
INNER JOIN [dbo].[F_ARTICLE] B ON B.AR_Ref = A.AR_Ref
INNER JOIN [dbo].[F_COMPTET] C ON C.CT_Num = A.CT_Num
WHERE A.DO_Type IN (6, 7) AND YEAR(A.DO_Date) >= 2021 AND B.MARQUE IN ('AQARA')
GROUP BY MONTH(A.DO_Date), YEAR(A.DO_Date), A.AR_Ref, C.TYPECLIENT, E.LI_Pays
ORDER BY 4,3
/*
*@File : DFRobot_Distance_A02.ino
*@Brief : This example use A02YYUW ultrasonic sensor to measure distance
* With initialization completed, We can get distance value
*@Copyright [DFRobot](https://www.dfrobot.com),2016
* GUN Lesser General Pulic License
*@version V1.0
*@data 2019-8-28
*/
const byte TRIGGER_PIN = 7; // entrée numérique 7 affectée au trig
const byte ECHO_PIN = 11; // entrée numérique 11 affectées à l'écho
const unsigned long MEASURE_TIMEOUT = 25000UL; // délais avant annulation de mesure : 25ms correspond à 8m à 340m/s
const float SOUND_SPEED = 340.0 / 1000; // Vitesse du son dans l'air en mm/us
void setup() {
Serial.begin(115200);
pinMode(TRIGGER_PIN, OUTPUT);
digitalWrite(TRIGGER_PIN, LOW);
pinMode(ECHO_PIN, INPUT);
@Hotfirenet
Hotfirenet / grocy.conf
Last active August 20, 2020 13:36
Installation de grocy sur une debian Buster clean
<VirtualHost *:80>
DocumentRoot /var/www/grocy/public
ErrorLog ${APACHE_LOG_DIR}/error-grocy.log
CustomLog ${APACHE_LOG_DIR}/access-grocy.log combined
<Directory "/var/www/grocy">
AllowOverride All
Order allow,deny
Allow from all
</Directory>
@Hotfirenet
Hotfirenet / OrderInvoice.php
Created March 23, 2020 13:56
Article HFN - Classer par marque et référence les produits dans le BL et la facture Prestashop - https://hotfirenet.com/blog/2689-classer-par-marque-et-reference-les-produits-dans-le-bl-et-la-facture-prestasop/
<?php
class OrderInvoice extends OrderInvoiceCore {
public function getProductsDetail() {
return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' SELECT od.*, p.*, ps.*
FROM `'._DB_PREFIX_.'order_detail` od
LEFT JOIN `'._DB_PREFIX_.'product` p ON p.id_product = od.product_id
LEFT JOIN `'._DB_PREFIX_.'product_shop` ps ON (ps.id_product = p.id_product AND ps.id_shop = od.id_shop)
LEFT JOIN `ps_manufacturer` m ON m.`id_manufacturer`= p.`id_manufacturer`
WHERE od.`id_order` = '.(int)$this->id_order.'
AND od.`id_order_invoice` = '.(int)$this->id .'
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash
vrdude: Version 6.3-20171130
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf"
User configuration file is "/Users/djo/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : /dev/cu.usbmodem1411
Using Programmer : wiring
sudo /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avrdude -C/Applications/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf -v -patmega2560 -cwiring -P/dev/cu.usbmodem1411 -b115200 -D -Uflash:w:/Users/djo/Downloads/RFLink_v1.1_r48/RFLink.cpp.hex
<?php
require_once dirname(__FILE__) . 'core/php/core.inc.php';
$user = user::byLogin('MonLogin');
$user->setPassword(sha1('monMDP'));
$user->save();
@Hotfirenet
Hotfirenet / remove_all_product_category_in_cart_rule.sql
Created July 25, 2019 09:49
Permet de supprimer tous les produits d'une règle panier contenu dans une categorie sur prestashop.
DELETE FROM ps_cart_rule_product_rule_value WHERE id_item IN (SELECT id_product FROM ps_category_product WHERE id_category = 53) AND id_product_rule = 1076