Skip to content

Instantly share code, notes, and snippets.

View walva's full-sized avatar
🏠
Working from home

Ellis Benjamin walva

🏠
Working from home
View GitHub Profile
@floptwo
floptwo / php-cli_ovh_mutu.md
Last active April 25, 2023 08:40
OVH PHP-CLI

PHP-CLI (PHP en ligne de commande) sur les hébergements mutualisés OVH

More complete info here http://cluster015.ovh.net/infos/ (thanks to @42antoine)

(cli)

/usr/local/php5.3/bin/php => PHP 5.3.29 (cli) (built: Nov 21 2017 08:55:07)
/usr/local/php5.4/bin/php => PHP 5.4.45 (cli) (built: Nov 21 2017 08:35:51)
/usr/local/php5.5/bin/php => PHP 5.5.38 (cli) (built: Nov 21 2017 08:46:45)
@develth
develth / SnakeCaseValidationParser.php
Last active May 15, 2018 10:00
Example of an ValidationParser for changing parameter keys to snake case
<?php
namespace Smoost\UtilityBundle\Parser;
use Nelmio\ApiDocBundle\DataTypes;
use Nelmio\ApiDocBundle\Parser\ValidationParser;
class SnakeCaseValidationParser extends ValidationParser
{
/**
// Equality
// equal :: a -> b -> boolean
function equal (a, b) {
if (typeof a !== typeof b) {
return false;
}
if (a === b) {
return true;
}
if (Array.isArray(a) && Array.isArray(b)) {