WordPress unexpected ‘$theme’ (T_VARIABLE) in constants.php

Parse error: syntax error, unexpected ‘$theme’ (T_VARIABLE) in /……./wp-content/themes/optima/lib/constants.php on line 1
 or perhaps
PHP Parse error: syntax error, unexpected ‘$theme’ (T_VARIABLE) in /…./wp-content/themes/Lightbox/lib/constants.php on line 1
what to do:

Simply re-upload the constants.php file.


When you upload the theme with FTP some of your file such as constans.php are compressed and spaces removed from file. That issue comes from some host. Trey to re-upload files that have errors.


Headless Jenkins Chrome testing on Ubuntu

Let’s go straight to the point :)

First, install a VNC server:

sudo apt-get install vnc4server

Be sure to use jenkins unix user from now on:

sudo su jenkins

Next, start and configure the server:


At this point, it should ask you to create a password for VNC. Do so, then continue.

Start a VNC screen on screen 99:

vncserver :99

If that goes through alright, then kill the screens created. (For me, when I ran vncserver for the first time, it created a screen at :1, so we’ll kill both of the screens created)

vncserver -kill :99  
vncserver -kill :1

Done with the vncserver part.
Then on jenkins:

- install XVNC plugin
- activate XVNC in every job that requires it
- run the job


How to make a job fail on Jenkins

Hello all,
This is a rather important topic with a rather simple solution:

  1. Add to your build an Execute Shell
  2.  Set the command to something like:
    if [ -f "$file" ]
        echo "$file found."
        echo "$file not found."
        exit 1

The important part for the failure is exit 1

If the condition meets it (and for what we care they can always meet it), exit 1 will fail the job.

Remembers that anything that fails (even plugins/syntax errors) will make the job fail.
Don’t fail at failing.

Continuos Integration with Jenkins and Github and Karma

Hello all,
Continuos integration is an hot and complex topic, not my usual beginner tutorial.  I found few documentation about this topic so i think it could be useful to give a direction to anyone who faces Jenkins for the first time and want to integrate it with a javascript project on github.

Read more

Node.js process doesn’t die on exit (ctrl+c)

Hello all,
Back in action with some uber simple node.js suggestions:
I bet that everybody have experimented the frustration of having this error:

EADDRINUSE, Address already in use

The reason is pretty simple, we quitted from the terminal without properly killing the node.js process. Till here everything plain and simple.

Then what to do to avoid this frustrating behavior…

Read more

I think there’s a jQuery plugin for that..

Hi all,
Because of the new job and my relocation to Paris i’ve been too busy to write any article in this period.

But since i don’t want to leave too many months without posts here is a nice picture with much wisdom:

If, for each functions in sass and images naming

Hi all,

This article seems a bit old since SASS is nowadays well-known and it has a lot of great tutorials everywhere, but i really wanted to suggest you to never forget to give your website images a proper naming structure, expecially icons.
I had to deal with a lot of icons during a recent project:

    background: url('../images/s1.png') no-repeat top left;
        background-image: url('../images/s1_on.png');  
    background: url('../images/s2.png') no-repeat top left;
        background-image: url('../images/s2_on.png');
    background: url('../images/s3.png') no-repeat top left;
        background-image: url('../images/s3_on.png');
    background: url('../images/s4.png') no-repeat top left;
        background-image: url('../images/s4_on.png');
// others

… and after 30 icons the whole _icons.sass would become a whole mess as you can see.
The first thing i thought is to use a common sass for cycle..

Read more

CSS3 transition FadeIn / FadeOut

Hi all,
Project after project i’m finding myself using css3 transition (and animation) more and more, till the point i’m questioning myself if $.animate is still a big deal.
Almost every animation is doable, with a nice retrocompatibility on older browser and awesome performance, today we’ll look at the easiest and most overused one: the Fade!

Read more

Two Years!

Wow! Two years has already passed since i decided to open this blog.
It went better than i expected, i consider this place a small dot on the web, but some people came here and found what they needed and some of them even left a comment and a token of their gratitude.
To all people that came here, expecially to those who found the time to leave a message..

Thank you

I read every comment and every single one made my a little happier :)

It’s nice to help people now and then.

Yours sincerely,


Plupload not uploading video on iPad / iPhone / iOS

So you are trying to chunck uploads or other cool stuff with Plupload?
Maybe you are making a “video uploader” with chuncked file but on iPad, iOS in general, when adding a video file nothing happens, while adding pictures or other files it works?
The problem is that the iOS device try to compress the video before sending it to the server, you aren’t seeing it now because multi_selection is not set to false (default is true)

var uploader = new plupload.Uploader({
     multi_selection : false

if you can afford to have only one upload a time, then switch it to false and try.
You’ll understand immediatly what happens on iOS devices after trying to upload a movie and why it wasn’t working before. :)