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 | |
// Licence : domaine public ou WTFPL | |
// 2018 BohwaZ <http://bohwaz.net/> | |
function check_ine($ine) | |
{ | |
if (!function_exists('bcmod')) | |
{ | |
throw new \LogicException('bcmath is required'); |
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
{ | |
"https:\/\/feeds.soundcloud.com\/stream\/908994106-pauloquiros-film-reroll-ep-95-memento-part-3.mp3": "Ep 95: Memento (Part 3)", | |
"https:\/\/feeds.soundcloud.com\/stream\/896374723-pauloquiros-film-reroll-ep-94-memento-part-2.mp3": "Ep 94: Memento (Part 2)", | |
"https:\/\/feeds.soundcloud.com\/stream\/885518080-pauloquiros-ep-93-memento-part-1.mp3": "Ep 93: Memento (Part 1)", | |
"https:\/\/feeds.soundcloud.com\/stream\/865158364-pauloquiros-film-reroll-ep-92-toy-story-part-2.mp3": "Ep 92: Toy Story (Part 2)", | |
"https:\/\/feeds.soundcloud.com\/stream\/852471577-pauloquiros-ep-91-toy-story-part-1.mp3": "Ep 91: Toy Story (Part 1)", | |
"https:\/\/feeds.soundcloud.com\/stream\/841027480-pauloquiros-film-reroll-ep-90-oceans-11-part-5.mp3": "Ep 90: Oceans 11 (Part 5)", | |
"https:\/\/feeds.soundcloud.com\/stream\/829642777-pauloquiros-film-reroll-ep-89-oceans-11-part-4.mp3": "Ep 89: Oceans 11 (Part 4)", | |
"https:\/\/feeds.soundcloud.com\/stream\/820194718-pauloquiros-film-reroll-ep-88-oceans-11-part |
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 | |
/** | |
* Extracteur de données des relevés de compte du Crédit Mutuel | |
* à destination de Garradin (ou autre logiciel de compta) | |
* | |
* https://garradin.eu/ | |
* | |
* Ce script prend en argument un répertoire contenant des extraits | |
* de compte en PDF (ou un seul extrait de compte) et crée un fichier | |
* CSV importable directement dans Garradin. |
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 | |
/** | |
* Extracteur de données des relevés de compte Paypal | |
* à destination de Garradin (ou autre logiciel de compta) | |
* | |
* https://garradin.eu/ | |
* | |
* Ce script prend en argument un fichier CSV exporté de Paypal | |
* https://business.paypal.com/merchantdata/reportHome?reportType=DLOG | |
* et produit un import exploitable dans Garradin |
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 | |
/** | |
* Reads data from LYWSD03MMC Xiaomi Mijia temperature sensor | |
* and stores it in a SQLite database. | |
* | |
* @author BohwaZ <https://bohwaz.net/> | |
* @see https://github.com/davi-domo/Xiaomi-Mijia-LYWSD03MMC-/blob/main/mijia_bd/MIJIA_MULTI_BD.sh | |
* @see https://smhosy.blogspot.com/2021/01/quelle-temperature-et-hydrometrie-dans.html | |
* @see https://www.fanjoe.be/?p=3911 | |
* |
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 | |
/* | |
* $db = new DB('file.sqlite'); | |
* var_dump($db->simple('SELECT * FROM table WHERE name = ?;', 'My Name')); | |
* var_dump($db->simpleSingle('SELECT * FROM table WHERE date > ? LIMIT 1;', '2020-01-01')); | |
* var_dump($db->simpleColumn('SELECT birthdate FROM table WHERE name = ?;', 'David Lynch')); | |
*/ | |
class DB extends \SQLite3 |
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 | |
namespace PHP81_BC; | |
/** | |
* Locale-formatted strftime using \IntlDateFormatter (PHP 8.1 compatible) | |
* This provides a cross-platform alternative to strftime() for when it will be removed from PHP. | |
* Note that output can be slightly different between libc sprintf and this function as it is using ICU. | |
* | |
* Usage: | |
* use function \PHP81_BC\strftime; |
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
Index: src/include/lib/Garradin/Membres/Session.php | |
================================================================== | |
--- src/include/lib/Garradin/Membres/Session.php | |
+++ src/include/lib/Garradin/Membres/Session.php | |
@@ -157,10 +157,21 @@ | |
protected function deleteAllRememberMeSelectors($user_id) | |
{ | |
return $this->db->delete('membres_sessions', $this->db->where('id_membre', $user_id)); | |
} |
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 php | |
<?php | |
/* | |
This file is part of KD2FW -- <http://dev.kd2.org/> | |
Copyright (c) 2001-2019 BohwaZ <http://bohwaz.net/> | |
All rights reserved. |
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 | |
// Mode d'emploi : créer un répertoire vierge et lancer "php cavites.php" | |
const JSON_URL = 'https://www.georisques.gouv.fr/webappReport/ws/telechargement/cavites?anneemin=2003'; | |
const PROJECTIONS = [ | |
1 => 'LambertI', | |
2 => 'LambertII', | |
3 => 'LambertIII', |