Skip to content

Instantly share code, notes, and snippets.

@marcw
marcw / AppKernel.php
Created January 10, 2012 17:37
SF2 functional test good practices
<?php
class AppKernel extends Kernel
{
static protected $connection;
public function boot()
{
parent::boot();
@marcw
marcw / sopa.vcl
Created January 17, 2012 20:43
Varnish vcl file in order for varnish to participate to the sopa blackout
# use with:
#
# varnishadm -T host:port -S /etc/varnish/secret "vcl.load sopa /path/to/your/sopa.vcl"
# varnishadm -T host:port -S /etc/varnish/secret "vcl.use sopa"
backend default {
.host = "127.0.0.1";
.port = "8080";
}
@marcw
marcw / ls output on the file
Created February 15, 2012 07:25
phpunit fails
~/work/sensiolabs/websites/obfuscated (master) ls -lah /usr/local/Cellar/php/5.3.8/lib/php/share/pear/PHPUnit/Framework/TestFailure.php
-rw-r--r-- 1 root admin 7,2K 15 fév 08:12 /usr/local/Cellar/php/5.3.8/lib/php/share/pear/PHPUnit/Framework/TestFailure.php
<?php
use Symfony\Component\ClassLoader\DebugUniversalClassLoader;
use Symfony\Component\Config\Loader\LoaderInterface;
use Symfony\Component\HttpKernel\Debug\ErrorHandler;
use Symfony\Component\HttpKernel\Debug\ExceptionHandler;
use Symfony\Component\HttpKernel\Kernel;
class AppKernel extends Kernel
{
@marcw
marcw / gist:1931848
Created February 28, 2012 10:47
Install of nodejs failed on osx 10.7.3
~/work/websites/test.local (master) brew install node !10157
==> Downloading http://nodejs.org/dist/v0.6.11/node-v0.6.11.tar.gz
######################################################################## 100,0%
==> ./configure --prefix=/usr/local/Cellar/node/0.6.11 --without-npm
==> make install
Waf: Entering directory `/private/tmp/homebrew-node-0.6.11-Cln5/node-v0.6.11/out'
[ 1/35] copy: src/node_config.h.in -> out/Release/src/node_config.h
[ 2/35] cc: deps/http_parser/http_parser.c -> out/Release/deps/http_parser/http_parser_3.o
[ 3/35] src/node_natives.h: src/node.js lib/dgram.js lib/console.js lib/buffer.js lib/querystring.js lib/punycode.js lib/http.js lib/net.js lib/stream.js lib/events.js lib/util.js lib/module.js lib/_debugger.js lib/assert.js lib/fs.js lib/child_process.js lib/os.js lib/readline.js lib/vm.js lib/url.js lib/tls.js lib/crypto.js lib/sys.js lib/https.js lib/freelist.js lib/dns.js lib/_l
/tmp/joyent-node-016540c ./configure !10195
{ 'target_defaults': { 'cflags': [],
'defines': [],
'include_dirs': [],
'libraries': ['-lz']},
'variables': { 'host_arch': 'x64',
'node_install_npm': 'true',
'node_install_waf': 'true',
'node_prefix': '',
'node_shared_cares': 'false',
/tmp/joyent-node-016540c make distclean !10224
rm -rf out
rm -f config.gypi
rm -f config.mk
/tmp/joyent-node-016540c ./configure !10225
{ 'target_defaults': { 'cflags': [],
'defines': [],
'include_dirs': [],
'libraries': ['-lz']},
'variables': { 'host_arch': 'x64',
<?php
use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\Config\Loader\LoaderInterface;
class AppKernel extends Kernel
{
static protected $databaseDefaultConnection;
public function registerBundles()
/**
* @ORM\Id
* @ORM\ManyToOne(targetEntity="Foo", inversedBy="inversedFoo")
* @ORM\JoinColumn(name="foo_id", referencedColumnName="id", onDelete="CASCADE")
* @Assert\NotNull()
*/
private $foo;
/**
* @ORM\Id
Bonjour %name%,
Votre email non-sollicite a obtenu un score de x/11 :
- Salutation de début de mail : 0
- Personnalisation du mail : 0
- Recherche préalable sur le destinataire du message : 0
- Contextualisation de la prise de contact : 0
- Formule de politesse en fin de mail : 0
- Demande de CV dans un format acceptable : 0