Skip to content

Instantly share code, notes, and snippets.

<?xml version="1.0" ?>
<container xmlns="http://symfony.com/schema/dic/services"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
<imports>
<import resource="parameters.php" />
</imports>
<parameters>
<parameter key="db_factory.class">MyVendor\Common\ServiceFactory\DBFactory</parameter>
<parameter key="db_factory.class">MyVendor\Common\Services\MyService</parameter>
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "ubuntu64-ansible"
config.vm.box_url = "http://www.monofone.de/boxes/ubuntu64.box"
config.vm.network :private_network, ip: "10.10.10.10"
config.vm.synced_folder ".", "/vagrant", type: "nfs"
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--memory", "1024"]
end
provisioning/roles/
!provisioning/roles/project
@monofone
monofone / MyController.php
Last active August 29, 2015 14:13
Passing the sonata admin-pool to the template
namespace AcmeBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
class MyController extends Controller
{
/**
* @Route("/my/index", name="my_index")
* @Template()
*/
{% extends 'SonataAdminBundle::standard_layout.html.twig' %}
{% block sonata_wrapper %}
<script type="text/x-handlebars" data-template-name="application">
<div class="wrapper row-offcanvas row-offcanvas-left">
{% block sonata_left_side %}
<aside class="left-side sidebar-offcanvas">
<section class="sidebar">
{% block sonata_side_nav %}
{% block sonata_sidebar_search %}
{% extends 'AcmeBundle::ember_layout.html.twig' %}
{% block sonata_admin_content %}
{% raw %}
<div class="ember">
<form class="form-horizontal">
{{ outlet }}
</form>
</div>
{% endraw %}
<?php
namespace Acme\DemoBundle\EventListener;
use Symfony\Component\Routing\RouterInterface;
class ConsoleListener
{
/**
* @var RouterInterface
@monofone
monofone / config_prod.yml
Created September 6, 2015 08:41
Doctrine metadata cache with redis
doctrine:
orm:
metadata_cache_driver:
type: redis
host: localhost
port: 6379
import { moduleForModel, test } from 'ember-qunit';
// take a look at the path using the project name and the path
// without the app folder here
import SomeOtherObjectNeeded from '<project>/models/my-other-object';
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
<title>500 Internal Server Error</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style>
* {
margin: 0;
padding: 0;
}