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 | |
/** | |
* Constant-time comparision length leak benchmark. | |
* Inspirated by https://gist.github.com/yohgaki/ede544f290c6cf9fa90d | |
* | |
* @author Kévin Dunglas | |
*/ | |
$knownSize = 1024; | |
$userShortSize = 512; |
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 | |
<<<CONFIG | |
packages: | |
- "symfony/serializer: ~2.6" | |
CONFIG; | |
use Symfony\Component\Serializer\Serializer; | |
use Symfony\Component\Serializer\Encoder\XmlEncoder; | |
use Symfony\Component\Serializer\Encoder\JsonEncoder; | |
use Symfony\Component\Serializer\Normalizer\GetSetMethodNormalizer; |
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 | |
<<<CONFIG | |
packages: | |
- "dunglas/php-property-info: dev-master" | |
- "doctrine/orm: ~2.3" | |
- "phpdocumentor/reflection: ~1.0" | |
CONFIG; | |
use Doctrine\ORM\EntityManager; |
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 | |
/** | |
* | |
* @package sfFacebookConnectPlugin | |
* @author Kévin Dunglas <dunglas@gmail.com> | |
* @author Fabrice Bernhard | |
* | |
*/ | |
class sfFacebookNewDoctrineGuardAdapter extends sfFacebookGuardAdapter { |
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 | |
trait T | |
{ | |
public function __construct() | |
{ | |
echo "Trait contructor"; | |
} | |
} |
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
// Prestashop 1.5.2, controllers/front/AuthController.php, line 278 | |
$customer = new Customer(); | |
$authentication = $customer->getByEmail(trim($email), trim($passwd)); | |
if (!$authentication || !$customer->id) | |
{ | |
// Handle brute force attacks | |
sleep(1); | |
$this->errors[] = Tools::displayError('Authentication failed'); | |
} |
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
# Assetic Configuration | |
assetic: | |
debug: %kernel.debug% | |
use_controller: false | |
bundles: [ DunglasChaplinDemoBundle ] | |
# java: /usr/bin/java | |
filters: | |
cssrewrite: ~ | |
coffee: | |
bin: %coffee_path% |
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
parameters: | |
# ... | |
coffee_path: /usr/local/share/npm/bin/coffee | |
node_path: /usr/local/bin/node |
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 | |
// Part of the Dunglas' Symfony 2 / Chaplin.js tutorial | |
// http://dunglas.fr/2012/12/utiliser-chaplin-js-et-backbone-js-avec-symfony-2-installation-et-configuration/ | |
namespace Dunglas\ChaplinDemoBundle\Controller; | |
use Symfony\Bundle\FrameworkBundle\Controller\Controller; | |
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; | |
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; |
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
{# | |
Part of the Dunglas' Symfony 2 / Chaplin.js tutorial | |
http://dunglas.fr/2012/12/utiliser-chaplin-js-et-backbone-js-avec-symfony-2-installation-et-configuration/ | |
#} | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Chaplin Boilerplate Application</title> | |
<style> |
OlderNewer