Skip to content

Instantly share code, notes, and snippets.

View l3pp4rd's full-sized avatar
🎯
Focusing

Gediminas Morkevicius l3pp4rd

🎯
Focusing
View GitHub Profile
@l3pp4rd
l3pp4rd / gist:1086164
Created July 16, 2011 08:36
Translatable default locale query hint
<?php
$qb = $em->createQueryBuilder();
$qb->select('a')
->from('Entity\\Article', 'a')
->add('where', $qb->expr()->not($qb->expr()->eq('a.title', ':title')))
->setParameter('title', 'NA')
;
$translationListener->setTranslatableLocale('es');
@l3pp4rd
l3pp4rd / comma-first-var.js
Created May 23, 2011 11:39 — forked from isaacs/comma-first-var.js
A better coding convention for lists and object literals in JavaScript
// See comments below.
// This code sample and justification brought to you by
// Isaac Z. Schlueter, aka isaacs
// standard style
var a = "ape",
b = "bat",
c = "cat",
d = "dog",
@l3pp4rd
l3pp4rd / d2-c2
Created May 10, 2011 08:03
bootstrap of d2
<?php
use Doctrine\Common\ClassLoader,
Doctrine\ORM\Configuration,
Doctrine\ORM\EntityManager,
Doctrine\Common\Cache\ArrayCache,
Doctrine\DBAL\Logging\EchoSqlLogger;
define('BASEPATH', __DIR__ . '/../system/');
require_once __DIR__ . '/config/database.php';