Skip to content

Instantly share code, notes, and snippets.

@lashae
lashae / nginx-letsencrypt.conf
Last active May 25, 2017 18:59
Nginx LetsEncrypt Configuration
server {
listen 0.0.0.0:80;
listen [::]:80;
server_name alanadi-1.com alanadi-2.com alanadi-3.com;
server_tokens off;
access_log /var/log/nginx/le_access.log;
error_log /var/log/nginx/le_error.log;
location /.well-known/ {
alias /var/www/letsencrypt/.well-known/;
@lashae
lashae / AllowedUser.php
Created August 28, 2015 08:36
Sf2 custom annotation
<?php
namespace AppBundle\Annotations;
/**
* @Annotation
*/
class AllowedUser
{
public $group;
}
@lashae
lashae / TodoController.php
Last active August 29, 2015 14:28
Sf2 Voter Implementation
<?php
// AppBundle/Controller/TodoController.php
namespace AppBundle\Controller;
use AppBundle\Entity\Todo;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security;
class TodoController extends Controller
{
/**