This file contains hidden or 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 | |
/** | |
* Calcul du chiffre-clé en PHP, modulo 10, récursif BVR Suisse | |
* Berechnung der Prüfziffer nach Modulo 10, rekursiv BESR Schweiz | |
* Calculating the Check Digits Using Module 10, Recursively | |
* | |
* @author gbaudoin | |
* @license GPL | |
* @see https://www.postfinance.ch/content/dam/pf/de/doc/consult/manual/dldata/efin_recdescr_man_fr.pdf | |
* @see https://gist.github.com/christianmeichtry/9348451 |
This file contains hidden or 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 Acme\Doctrine\DBAL; | |
use Doctrine\DBAL\Connection; | |
declare(ticks = 3000000); | |
class ConnectionKeepAlive | |
{ | |
/** |
This file contains hidden or 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
# Calcul du chiffre-clé, modulo 10, récursif BVR Suisse | |
# Berechnung der Prüfziffer nach Modulo 10, rekursiv BESR Schweiz | |
# Calculating the Check Digits Using Module 10, Recursively | |
def modulo10_checksum(number) # Best to send a string, an integer with leading 0's will be interpreted as octal... | |
# table from https://www.credit-suisse.com/media/production/pb/docs/unternehmen/kmugrossunternehmen/besr_technische_dokumentation_fr.pdf | |
table = [ | |
[0,9,4,6,8,2,7,1,3,5], | |
[9,4,6,8,2,7,1,3,5,0], |
This file contains hidden or 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
# apache+mariadb+php+misc | |
sudo apt-add-repository ppa:ondrej/php | |
sudo apt update | |
sudo apt install blueman libspa-0.2-bluetooth vim curl git git-gui gitk htop nginx nginx-extras mariadb-server zip graphicsmagick php-cli php-gd php-xml php-mysql php-sqlite3 php-mbstring php-curl php-imagick php-xml php-zip php-bcmath php-bz2 php-soap php-intl php-apcu php-pcov php-fpm php-yaml | |
# wp-cli | |
wget https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar | |
chmod +x wp-cli.phar | |
sudo mv wp-cli.phar /usr/local/bin/wp |