View sfFacebookNewDoctrineGuardAdapter.class.php
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 { |
View invite-friends.js
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
// Scroll to the bottom of the friend list and type the following line in your console | |
// For checkboxes (e.g. invite to an event) | |
var c = document.querySelectorAll("a[role='checkbox']"); for (var i = 0; i < c.length; i++) c[i].click(); | |
// For invite buttons (e.g. invite to like a page) | |
var c = document.querySelectorAll(".uiButton._1sm"); for (var i = 0; i < c.length; i++) c[i].click(); |
View sleep-AuthController.php
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'); | |
} |
View config.yml
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% |
View parameters.yml
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 |
View DefaultController.php
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; |
View index.html.twig
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> |
View hello_world_application.coffee
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/ | |
define [ | |
'chaplin' | |
'views/layout' | |
'routes' | |
], (Chaplin, Layout, routes) -> | |
'use strict' | |
View config.yml
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/ | |
fos_rest: | |
routing_loader: | |
default_format: json | |
body_listener: true |
View bench.php
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; |
OlderNewer