Skip to content

Instantly share code, notes, and snippets.

View Basster's full-sized avatar

Ole Rößner Basster

View GitHub Profile
@Basster
Basster / SymfonyConventionsExtraBundleInteropTemplateGuesser.php
Last active May 5, 2017 11:44
Let QafooLabsNoFrameworkBundle and FrameworkExtraBundle play nicely together
<?php
declare(strict_types=1);
namespace DI\View;
use QafooLabs\Bundle\NoFrameworkBundle\View\TemplateGuesser;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use Symfony\Component\HttpFoundation\RequestStack;
/**
# IntelliJ Project
.idea/*
# Temp and swap files
*~
*.swp
*.tmp
# Compiled source
*.com
@Basster
Basster / gist:8441857
Last active January 3, 2016 09:19 — forked from croxton/gist:4073583
Activate xdebug 2.2.3 for AMPPS on OSX
On AMPPS 2.2 xdebug.so is included for all shipped PHP versions but not at the correct folders.
To activate it, follow these steps:
1.) make sure xdebug.so can be found in these locations:
/Applications/AMPPS/php-5.3/lib/extensions/xdebug.so
/Applications/AMPPS/php-5.4/lib/extensions/xdebug.so
/Applications/AMPPS/php-5.5/lib/extensions/xdebug.so
As AMPPS just changes a symlink when changing PHP versions, you need to edit the config files for each of the versions:
@Basster
Basster / jQueryConfirm.js
Created April 4, 2013 14:05
jQueryUi alert/confirm alternative
/**
* Creates a modal jQueryUi Dialog which displays a message.
* More or less a jQuery Styled alert().
*
* @param message The message to display
* @param [title] The title for the dialog box. Defaults to "Hinweis".
* @param [yesCallback]
* @param [noCallback]
*/
function jQueryConfirm(message, title, yesCallback, noCallback) {
@Basster
Basster / sf2.bat
Created November 21, 2012 09:58
Symfony2 batch for Windows development
@ECHO off
SET params=
REM Merge all batch parameters into one string
:startloop
IF "%1"=="" GOTO endloop
SET params=%params%%1
SHIFT
GOTO startloop
:endloop
REM call symfony console with batch params
@Basster
Basster / MD5.php
Created May 23, 2012 11:40
Doctrine MySQL MD5 FunctionNode
<?php
namespace YourCompany\YourCustomer\YourBundle\DQL;
use Doctrine\ORM\Query\AST\Functions\FunctionNode;
use Doctrine\ORM\Query\Parser;
use Doctrine\ORM\Query\SqlWalker;
use Doctrine\ORM\Query\Lexer;
/**