Skip to content

Instantly share code, notes, and snippets.


Toni Uebernickel havvg

View GitHub Profile
havvg / Firewall.js
Last active Dec 12, 2022
ExtJS 6: JSON Web Token API Login with Promises
View Firewall.js
Ext.define('', {
singleton: true,
requires: [
isLoggedIn: function() {
return null !==;
havvg / ajax-form.js
Created Aug 1, 2012
jQuery AJAX form submit with Twitter Bootstrap modal
View ajax-form.js
jQuery(function($) {
$('form[data-async]').live('submit', function(event) {
var $form = $(this);
var $target = $($form.attr('data-target'));
type: $form.attr('method'),
url: $form.attr('action'),
data: $form.serialize(),
havvg / symfony.phpunit.xml
Created Dec 3, 2010
An example PHPUnit configuration file for symfony projects running on 512MB phpUnderControl server
View symfony.phpunit.xml
<?xml version="1.0" encoding="UTF-8"?>
havvg / Builder.php
Created Feb 8, 2012
Symfony2 KnpMenu TwitterBootstrap switch user menu
View Builder.php
namespace Ormigo\Bundle\BackofficeBundle\Menu;
use Knp\Menu\FactoryInterface;
use Symfony\Component\DependencyInjection\ContainerAware;
use Ormigo\Bundle\UserBundle\Model\User\UserQuery;
use Symfony\Component\Security\Core\Role\SwitchUserRole;
havvg /
Created Dec 20, 2011
git bisect phpunit wrapper
if [ $EXIT_CODE -eq "255" ]; then
# Wrapping the error code to 1, so bisect marks this build as "bad" and continues.
exit 1
havvg / DateRange.php
Last active Oct 24, 2021
Symfony2: poor man's date_range form type
View DateRange.php
namespace Ormigo\Bundle\OrmigoBundle\Form\Model;
use DateTime;
class DateRange
* @var DateTime
havvg / AsynchronousEventDispatcher.php
Last active Jan 20, 2021
Asynchronous Event Dispatcher
View AsynchronousEventDispatcher.php
namespace Ormigo\Component\EventDispatcher;
use Symfony\Component\Console\ConsoleEvents;
use Symfony\Component\Console\Event\ConsoleTerminateEvent;
use Symfony\Component\EventDispatcher\Event;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
havvg / schema.xml
Created Aug 13, 2012
Propel 1.6: Sluggable with I18n
View schema.xml
<?xml version="1.0" encoding="UTF-8"?>
<database name="default" defaultIdMethod="native" xmlns:xsi="" xsi:noNamespaceSchemaLocation="">
<table name="country">
<column name="id" type="integer" autoIncrement="true" primaryKey="true" />
<column name="iso_code" type="char" size="2" required="true" />
<column name="name" type="varchar" size="255" required="true" primaryString="true" />
<behavior name="i18n">
<parameter name="i18n_columns" value="name, url" />
<parameter name="default_locale" value="de_DE" />
havvg / ZendKernel.php
Created Dec 29, 2016
StackPHP Example: Symfony + Zend Framework (ZF1)
View ZendKernel.php
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Symfony\Component\HttpKernel\HttpKernelInterface;
use Symfony\Component\HttpKernel\TerminableInterface;
use Symfony\Component\Routing\Exception\ResourceNotFoundException;
class ZendKernel implements HttpKernelInterface, TerminableInterface
View .gitconfig
editor = mate -w -l 1
excludesfile = ~/.gitignore
whitespace = trailing-space,space-before-tab,-indent-with-non-tab,tab-in-indent,tabwidth=2
autocrlf = input
ignorecase = true
patience = true
algorithm = patience