Skip to content

Instantly share code, notes, and snippets.

View matteosister's full-sized avatar
🤗

Matteo Giachino matteosister

🤗
View GitHub Profile
server {
server_name www.hostname.com;
root /var/www/hostname/current/web;
listen 81 default_server;
error_log /var/log/nginx/error.log;
access_log /var/log/nginx/access.log;
rewrite ^/app\.php/?(.*)$ /$1 permanent;
@matteosister
matteosister / OptionRepositoryTrait.php
Last active August 29, 2015 13:57
A trait to use the PhpOption in the EntityRepository
<?php
namespace Vendor\Repository;
use PhpOption\Option;
use Doctrine\DBAL\LockMode;
trait OptionRepositoryTrait
{
public function find($id, $lockMode = LockMode::NONE, $lockVersion = null)
@matteosister
matteosister / deploy.rb
Last active December 16, 2015 02:49
deploy@facile.it
set :application, "Facile"
set :domain, "prod1"
set :deploy_to, "/home/www"
set :repository, "git@localhost/facile.git"
set :scm, :git
role :web, domain # Your HTTP server, Apache/etc
role :app, domain # This may be the same as your `Web` server
role :db, domain, :primary => true # This is where symfony migrations will run
@matteosister
matteosister / Controller.php
Last active December 11, 2015 05:18
symfony2 @ facile.it
<?php
// src/Acme/DemoBundle/Controller/MainController.php
class MainController
{
public function contactAction()
{
return new Response('<h1>Contact us!</h1>');
}
}
composer init -n --require=cypresslab/walrus:dev-develop && composer install
Your requirements could not be resolved to an installable set of packages.
Problem 1
- jms/security-extra-bundle 1.2.0 requires jms/metadata 1.1.* -> satisfiable by jms/metadata 1.1.1.
- jms/security-extra-bundle 1.2.0-RC requires jms/metadata 1.1.* -> satisfiable by jms/metadata 1.1.1.
- jms/security-extra-bundle 1.2.x-dev requires jms/metadata 1.1.* -> satisfiable by jms/metadata 1.1.1.
- Conclusion: don't install jms/metadata 1.1.1
- Installation request for jms/security-extra-bundle 1.2.* -> satisfiable by jms/security-extra-bundle 1.2.0, jms/security-extra-bundle 1.2.0-RC, jms/security-extra-bundle 1.2.x-dev.