Skip to content

Instantly share code, notes, and snippets.

@snc
snc / buildBootstrap.sh
Created April 25, 2012 10:28
Symfony 2.0.x with composer
#!/bin/sh
cd `dirname $0`
if [ -d "../vendor/symfony/symfony" ]; then
cd "../"
fi
ROOT=`pwd`
cd vendor/symfony && ln -s symfony/src
@snc
snc / InteractiveLoginListener.php
Created October 25, 2011 13:44
Custom FOSUB redirects
<?php
namespace My\Bundle\EventListener;
use My\Bundle\User\User;
use Symfony\Component\Routing\Router;
use Symfony\Component\Security\Http\Event\InteractiveLoginEvent;
class InteractiveLoginListener
{
@snc
snc / devtools-page.html
Created August 6, 2011 13:36
Chrome Developer Tools Panel
<!doctype html>
<html>
<head>
<script>
(function(dt) {
var requestUrl;
dt.panels.create("Panel", "logo_24.png", "panel.html");
dt.resources.onNavigated.addListener(function(url) {