Skip to content

Instantly share code, notes, and snippets.

Avatar
👻

Matteo Giachino matteosister

👻
View GitHub Profile
View gist:17c1ec8bc2b391ae5def
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 Aug 29, 2015
A trait to use the PhpOption in the EntityRepository
View OptionRepositoryTrait.php
<?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 Dec 16, 2015
deploy@facile.it
View deploy.rb
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 Dec 11, 2015
symfony2 @ facile.it
View Controller.php
<?php
// src/Acme/DemoBundle/Controller/MainController.php
class MainController
{
public function contactAction()
{
return new Response('<h1>Contact us!</h1>');
}
}
View installation.sh
composer init -n --require=cypresslab/walrus:dev-develop && composer install
View gist:3794247
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.