- Code must follow PSR-2.
- Classes must have a docblock documentation describing their purpose.
- Class methods must have a docblock documentation, in this order:
- A mandatory one-line short description.
- An optional multi-line long description.
- A mandatory
@param
annotation for each parameter:@param [type] [name] [description]
[type]
is the type of the variable, primitive or class.[name]
is the name of the parameter, including the leading$
.[description]
is a short description of the parameter. If the description spans multiple lines, all lines must be indented by the same number of spaces as the first line.
- The indentation must be such as types, names and descriptions for all parameters of a single method start on the same column.
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
From 664f364c5c08a4bcb51d8ebdda2f72b9e8f8d491 Mon Sep 17 00:00:00 2001 | |
From: Benjamin Morel <[email protected]> | |
Date: Sun, 17 Sep 2023 14:50:28 +0200 | |
Subject: [PATCH] Patch | |
--- | |
scripts/mysql/mysql_load_db.sh | 5 ++--- | |
1 file changed, 2 insertions(+), 3 deletions(-) | |
diff --git a/scripts/mysql/mysql_load_db.sh b/scripts/mysql/mysql_load_db.sh |
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 | |
if [ -z $1 ]; then | |
echo "Usage: $(basename $0) [name]" | |
exit 1 | |
fi | |
message() { | |
printf '%-60s' "$*" | |
} |
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 | |
/** | |
* Converts all PHP files in a directory to short array syntax. | |
* Note that this will overwrite all converted PHP files. | |
* Be sure to have a backup just in case. | |
*/ | |
if ($argc !== 2) { |
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
sudo apt-get remove --purge "^mysql.*" | |
sudo apt-get autoremove | |
sudo apt-get autoclean | |
sudo rm -rf /var/lib/mysql | |
sudo rm -rf /var/log/mysql | |
echo mysql-apt-config mysql-apt-config/enable-repo select mysql-5.7-dmr | sudo debconf-set-selections | |
wget http://dev.mysql.com/get/mysql-apt-config_0.2.1-1ubuntu12.04_all.deb | |
sudo dpkg --install mysql-apt-config_0.2.1-1ubuntu12.04_all.deb | |
sudo apt-get update -q | |
sudo apt-get install -q -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" mysql-server |
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
/** | |
* Fix for vw, vh, vmin, vmax on iOS 7. | |
* http://caniuse.com/#feat=viewport-units | |
* | |
* This fix works by replacing viewport units with px values on known screen sizes. | |
* | |
* iPhone 6 and 6 Plus cannot run iOS 7, so are not targeted by this fix. | |
* Target devices running iOS 8+ will incidentally execute the media query, | |
* but this will still produce the expected result; so this is not a problem. |
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 | |
$variadics = 1000; // number of objects passed to each variadic function | |
$iterations = 1000; // number of calls of each function | |
class Foo { | |
} | |
function withoutTypeHinting(...$foos) { | |
} |
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 | |
/** | |
* Converts a text message to HTML. | |
* | |
* The following transformations are applied: | |
* - Special characters are encoded to HTML entities, | |
* - Lines of text separated by an emtpy line are converted to paragraphs, | |
* - Newline characters are converted to `<br>`, | |
* - Links and e-mail addresses are converted to HTML links, |
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 | |
/* Replace with your connection parameters & database name */ | |
$hostname = 'localhost'; | |
$username = 'root'; | |
$password = ''; | |
$database = 'test'; | |
$pdo = new PDO("mysql:host=$hostname", $username, $password); |
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 -e | |
sudo yum update -y | |
sudo yum install -y yum-utils wget | |
# EPEL repo | |
sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm | |
sudo yum-config-manager --enable epel | |
# Remi repo |
OlderNewer