Skip to content

Instantly share code, notes, and snippets.

View immutef's full-sized avatar

immutef

  • SCAYLE GmbH
  • Hamburg, Germany
View GitHub Profile
@immutef
immutef / assetic.yml
Last active January 20, 2021 06:57
Assetic package management in Symfony2
assetic:
assets:
bootstrap: # translates to the asset path 'assetic/bootstrap.js'
filters: ?uglifyjs2
inputs:
- '@AcmeDemoBundle/Resources/bower/bootstrap/js/bootstrap-transition.js'
- '@AcmeDemoBundle/Resources/bower/bootstrap/js/bootstrap-alert.js'
- '@AcmeDemoBundle/Resources/bower/bootstrap/js/bootstrap-button.js'
- '@AcmeDemoBundle/Resources/bower/bootstrap/js/bootstrap-carousel.js'
- '@AcmeDemoBundle/Resources/bower/bootstrap/js/bootstrap-collapse.js'
@immutef
immutef / UserController.php
Created December 22, 2011 15:21
[Symfony2] example usage of streamed response and post response code execution
<?php
/*
* Example usage of streamed response and post response code execution.
*
* @author Pierre Minnieur <pierre.minnieur@sensiolabs.de>
*
* @see https://github.com/symfony/symfony/pull/2791
* @see https://github.com/symfony/symfony/pull/2935
* @see https://github.com/sensio/SensioFrameworkExtraBundle/pull/86
@immutef
immutef / AbstractService.php
Created September 26, 2014 10:36
Abstract Service Definitions with Constructor Arguments
<?php
abstract class AbstractService
{
public function __construct(SomeService $someService)
{
// ...
}
}
@immutef
immutef / SecurityController.php
Created October 27, 2010 09:58
Symfony2 Security Form Login
<?php // src/Application/UserBundle/Controller/SecurityController.php
namespace Application\UserBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller,
Symfony\Component\Security\SecurityContext;
class SecurityController extends Controller
{
public function loginAction()
@immutef
immutef / symfony2-pull-requests.md
Created October 25, 2010 19:10
HowTo: clean GitHub pull requests for Symfony2
  1. Fork Fabiens repository: http://github.com/fabpot/symfony.git

  2. Clone your fork and install/update vendors (I use my personal fork for now):

    git clone git@github.com:pminnieur/symfony.git symfony

    cd symfony && sh install_vendors.sh && sh update_vendors.sh

    phpunit

  3. Integrate Fabiens repository into your local clone:

<?php
namespace Turtle\ApiBundle\Serializer\Normalizer;
use Symfony\Component\Serializer\Normalizer\AbstractNormalizer,
Symfony\Component\Serializer\SerializerInterface;
class DateTimeNormalizer extends AbstractNormalizer
{
/**
@immutef
immutef / dnsmasq.conf
Created October 17, 2013 16:26
MacOS, Vagrant, dnsmasq, ipfw
listen-address=127.0.0.1
# interface=lo
address=/dev/127.0.0.1
address=/local/127.0.0.1
no-dhcp-interface=no
@immutef
immutef / .env
Last active December 24, 2015 03:19
Symfony & Foreman
SYMFONY__DATABASE_DRIVER="pdo_mysql"
SYMFONY__DATABASE_HOST="127.0.0.1"
SYMFONY__DATABASE_PORT=3306
SYMFONY__DATABASE_NAME="symfony"
SYMFONY__DATABASE_USER="root"
SYMFONY__DATABASE_PASSWORD=""
@immutef
immutef / composer.json
Created May 23, 2013 13:33
Why does this install symfony/symfony 2.3.0-RC1 ?
{
"name": "acid/acid",
"type": "library",
"description": "Acid Testing Framework",
"keywords": ["acid", "testing", "framework", "tdd", "xunit", "unit", "dsl", "assert"],
"homepage": "http://acid.ferm.io/",
"license": "MIT",
"authors": [{
"name": "Pierre Minnieur",
"email": "pierre@ferm.io",
@immutef
immutef / README.md
Last active December 15, 2015 16:09
Diablo 3 Crafting Helper

Usage

Select the gem/item you want to craft, then point your mouse over the crafting button. Now execute the craft.py script followed by the number of gems/items you want to craft.

$> ./craft.py <number>

Wait while the craft button is pressed every 3.6 seconds until everything is crafted.