Skip to content

Instantly share code, notes, and snippets.

<?php
use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\Config\Loader\LoaderInterface;
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = array(
<?php
use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\Config\Loader\LoaderInterface;
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = array(
$grid = $this->getContainer()->get('grid');
$out->writeln(spl_object_hash($grid));
$out->writeln(spl_object_hash($this->getContainer()->get('grid')));
$ s3cmd ls
2013-03-08 19:45 s3://setfive-db
$ s3cmd put tester-1.jpg s3://setfive-db/tester-1.jpg
tester-1.jpg -> s3://setfive-db/tester-1.jpg [1 of 1]
6312 of 6312 100% in 0s 33.98 kB/s done
$ s3cmd del s3://setfive-db/tester-1.jpg
File s3://setfive-db/tester-1.jpg deleted
$ s3cmd mb s3://setfive-test
Bucket 's3://setfive-test/' created
#!/bin/bash
SQL_FILE="$(date +%m-%d-%y).sql"
mysqldump -ubackupuser -p'backupuser-password' --all-databases > "$SQL_FILE"
RC = $?
if [[ $RC != 0 ]] ; then
echo "Failure, mysqldump failed to dump"
exit $RC;
fi
gzip "$SQL_FILE"
services:
my.login_listener:
class: Setfive\DemoBundle\Listener\LoginListener
tags:
- { name: kernel.event_listener, event: security.switch_user, method: onSecuritySwitchUser }
<?php
namespace Setfive\DemoBundle\Listener;
use Symfony\Component\Security\Http\Event\InteractiveLoginEvent;
use Symfony\Component\Security\Http\Event\SwitchUserEvent;
class LoginListener
{
/**