Quantcast
Channel: smottt
Browsing all 13 articles
Browse latest View live

Symfony2: Upgrading 2.0 to 2.1 – CallbackValidator

The CallbackValidator class was deprecated in 2.1. If you implemented custom validators using this interface, you can substitute them by event listeners listening to the FormEvents::POST_BIND (or any...

View Article



Fix for: There is no `_sonata_admin` defined for the controller …

If you stumbled upon the following error while trying to make SonataAdminBundle work: There is no `_sonata_admin` defined for the controller `Acme\DemoBundle\Controller\PostController` and the current...

View Article

So you wish to play poker online

Pound for Pound: Advantages of online poker over live poker Since the online poker industry boomed in the beginning of the 21st century, these online poker sites are reaping the benefits of the rapid...

View Article

Passing configuration options to Hadoop

If you want to override Hadoop job configuration options, you can do so via command line -D key=value. When I wanted to pass multiple configuration options including some special characters: hadoop jar...

View Article

Free roll poker tournaments

Free roll poker tournaments, also known as “freerolls”, are a great way for you to get some poker practice in, and to get some poker hands under your belt without risking any real money, but you should...

View Article


Get Doctrine2 DBAL connection for different databases in Symfony2

Let’s say you have multiple databases you want to connect to and your config looks similar to the following: So we have a default DBAL connection to db1 and we have 2 other databases db2 and db3 we...

View Article

Detect if a synthetic service has been set in Symfony2 Dependency Injection...

If you are using the Symfony2 DependencyInjection component, you might have run into synthetic services. If I quote from the docs: Synthetic services are services that are injected into the container...

View Article

Eclipse / Zend Studio crashing on New project on Ubuntu KDE

If you are using the latest stable versions of either Eclipse or Zend Studio on Ubuntu with KDE installed you might have run into some trouble along the way. If you have oxygen theme installed the IDE...

View Article


Zend Z-Ray: How to run it on PHP’s built-in web server

Zend Z-Ray: How to run it on PHP’s built-in web server In early August I, amongst other ZCEs, got an invitation from Zeev to give their Technology Preview of Zend Z-Ray a try. However, since all...

View Article


A case for PHP session handlers

tl;dr: Don’t blindly write @session_start(); and hope for the best. Use a session handler! A case for PHP session handlers Not long ago, we were in transition from using Memcache to using Redis. Up...

View Article

Doctrine2: CHAR with annotations

Ever wondered if there is a better way of defining a CHAR (mysql) with doctrine2 annotations? From doctrine2 docs: <?php /**  * @Column(type="string", columnDefinition="CHAR(2) NOT NULL")  */...

View Article

(PHP) Code snippet #6

A while ago I encountered thle following one-liner snippet in a legacy codebase. Yes, it was a one-liner! Alarming. So, what does it do? Let’s tear it apart and see. Hint: it displays the name of the...

View Article

Meteor development with a real subdomain and HTTPS

TL;DR: Use the nourharidy:ssl package. The story I’ve been doing some Meteor development lately. There was a need to run the local server under a real subdomain (instead of localhost) with HTTPS. So I...

View Article

Browsing all 13 articles
Browse latest View live




Latest Images