Skip to content

Instantly share code, notes, and snippets.

View LouWii's full-sized avatar

Louis D. LouWii

View GitHub Profile
LouWii / AcmePathRoles.php
Last active August 31, 2018 15:56 — forked from leotiger/
Symfony3: Check if a route is accessible for a ROLE or a list of ROLES
namespace Acme\Security\Roles;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\RouterInterface;
use Symfony\Component\Routing\Route;
use Symfony\Component\Security\Core\Authorization\AccessDecisionManagerInterface;
use Symfony\Component\Security\Core\User\UserProviderInterface;
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
use Symfony\Bridge\Monolog\Logger;
LouWii / nginx.conf
Last active December 22, 2015 11:19 — forked from leon/nginx.conf
NGinx Server block configuration for Symfony 2 app.
# Things needed to be adapted :
# server_name
# root /home/www
# The root of the Symfony "web" folder (with app.php and app_dev.php in it).
# fastcgi_pass unix:/var/run/php5-fpm.sock
# This sock can be elsewhere (/var/run/php5-fpm/php5-fpm.sock for example...)
# There are other things needed to be changed/fixed.
LouWii / robot.js
Created December 7, 2012 10:25 — forked from jaskolek/robot.js
var robots = new Array();
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
Robot.prototype.start = function( ev ){