Fork me on GitHub


Welcome to
I'm Jean-François Lefebvre, a passionate PHP/mobile developer living in Brussels, Belgium. This is my technical blog where I'm experimenting and sharing my ideas or findings with the world. Feel free to check v2 which is my sandbox where I play with Silex and various REST APIs.
If you like pinterest and are looking for a script to build a page with your pins, you should check my pinterest page, the code is available on github .
Don't hesitate to contact me.


Need help to build your project ?

Don't hesitate to contact me to get a quote or visit

v2 sandbox

Feel free to check v2 which is my web development sandbox : I'm playing with several technologies and I'm building a web app allowing to configure and deploy rapidly a web site with social media integration and being able to be extended as needed. And of course, it's built lean with Silex and the best of open source software.

Odoo 8.x & Odoo 9.x ubuntu install fix - update-python-modules: not found

You received the following error trying to install Odoo on Ubuntu ?

/var/lib/dpkg/info/odoo.postinst: 28: /var/lib/dpkg/info/odoo.postinst: update-python-modules: not found

try this to fix the issue
dpkg -i python-support_1.0.15_all.deb
apt install odoo

Chrome on Fedora 22

Enable Google YUM repository

Run following command (copy & paste all lines to console) to create /etc/yum.repos.d/google-chrome.repo file:

cat << EOF > /etc/yum.repos.d/google-chrome.repo
name=google-chrome - \$basearch

Install Google Chrome Stable Version

dnf install google-chrome-stable

Using PHP on infomaniak cloud server shell

Infomaniak cloud server is a very nice environment to deploy your web applications.
Here is a tip : to use PHP and especially install composer you must provide the -d option

Install composer

curl -s | php -d detect_unicode=Off

Install your project dependencies

php -d detect_unicode=Off composer.phar install --prefer-dist --no-dev

The SDK Build Tools revision (19.0.1) is too low for project after android studio update

If you update android studio, gradle could display the following message when you try to clean or build your project :

The SDK Build Tools revision (19.0.1) is too low for project ':app'. Minimum required is 19.1.0

To fix this, install the SDK Build tools if it's not yet installed via the SDK manager and go to your module settings (click right on your project and choose open module settings).
Then in the properties tab on your module, update the value in Build Tools Version.

PHP : remove duplicate elements from a multi-dimensional array

"array_unique" removes duplicate values from an array. Unfortunately it doesn't work with multi-dimensional arrays.
A quick workaround is to serialize all elements of the first/parent array in order to make it unidimensional, let "array_unique" doing its job and then unserialize it back.

$uniqueArray = array_map("unserialize", array_unique(array_map("serialize", $nonUniqueArray)));

android config

Cyril Mottier has a great post about getting a productive android development environment. It's really useful to find the best tools to avoid frustration that can come with android tools especially the emulator and tips to make things easier and faster when you are developing or even learning to create android apps.

Basically he uses three things :

  • genymotion which is a fast virtual device based on virtualbox to replace the default emulator.
  • android studio : using eclipse can be painful, slow and sometimes even crashes. Android studio is based on IntelliJ IDEA and can be a good alternative. It's still under early access preview.
  • Gradle can automate the building, testing, publishing, deployment and more of software packages or other types of projects such as generated static websites, generated documentation or indeed anything else. It combines the power and flexibility of Ant with the dependency management and conventions of Maven into a more effective way to build.

So, I've updated my environment and play around with all these new tools.
I think that switching to an SSD drive can improve A LOT your daily experience as a developer. I've seen a lot of BEFORE/AFTER videos on youtube and it's really impressive to see the improvement that it can bring.

Stripe : A REST API documentation beautifully crafted

Stripe is a suite of APIs that powers commerce for businesses of all sizes. You just have to register and with several lines of code you can implement a simple form in your web site to accept payment.
The thing that struck me on the back-end and the API is the stunning beauty and attention to every detail.
It seems that they have implemented their own REST API documentation generator, there is some open source packages to generate documentation but nothing close
to the following documentation in terms of awesomeness. SAMI does a pretty good job, but generating documentation for REST API requires a tool specialized.

Stripe : A REST API documentation beautifully crafted

The Wolf of Wall Street VFX Highlights

A look at some of the more challenging shots put together from Martin Scorsese's new film The Wolf of Wall Street, starring Leonardo DiCaprio, Jonah Hill, and Matthew McConaughey.

android throwing NetworkOnMainThreadException when trying to open a socket

I'm currently improving my inspiration widget and it stopped working on nexus7.
With android api >=16, it throws an NetworkOnMainThreadException when I try to make http request.
If you want to make it work, you must execute your code in a thread.

new Thread(new Runnable() {
            public void run() {    
                try { 
                        // your network related code
                }catch (IOException e) {

Source; Stackoverflow

Nexus 7 - Inspiration widget -

How to enable developer settings on the nexus 7

Very weird, but google has hidden the development settings on the nexus 7 by default.
To get them back :

  1. Go to the settings menu, and scroll down to "About phone." Tap it.
  2. Scroll down to the bottom again, where you see "Build number."
  3. Tap it seven (7) times. After the third tap, you'll see a playful dialog that says you're four taps away from being a developer. Keep on tapping, and then at the seventh tap you will receive a final message telling you that you are a developer now.

A new item is now available in the system section of the main settings to change the development settings.

Pinterest and casperjs scripts on github

After several attempts, I've finally succeeded to webscrap pinterest pins.
Feel free to clone or fork my pinterest project.
It provides scripts to webscrap data from pinterest : it's done in two phases with a casperjs script to download all pins data and a PHP script to download locally original images
and create thumbnails. And finally, the index.php implements a cool and elegant way to display your pinterest pins using perpetual scroll and Wookmark jQuery plugin.

Based on these scripts, I've implemented a web app helping people to save their pins to their dropbox account. More infos soon.
I'm thinking about a free version (one shot) and a PRO monthly paid version including sync of the data. The project is built on Silex, MySQL, Zurb foundation, Zurb ink and jQuery.

Last experiments

This week, I've made some small updates.

- my drupal theme is now based on bootstrap 3 which is mobile first by default. I've switched to a different web font/size. I really satisfied with the result.

- I've installed the memcached drupal module and configured it to use the memcached instance that was already running and used to store my inspirational quotes data served by a REST service to my android app..
My first impression is that it's running faster, but I should make some benchmarks to get a more precise idea.

- My pinterest webscrapping script has been updated : I'm still looking for an automatic way to web scrap my pins. It was the case when pinterest was using a simple parameter allowing to specify the page number but they switched the UI using a perpetual scrolling page based on ajax requests.

At this point, I'v a javascript/jQuery script that I execute when my pinterest page is loaded ( to force the perpetual scrolling page to load all the pins and then displaying in the browser a list of the data extracted from the DOM with jQuery, After that, I copy and paste the content to a file. Then, the second step is to run a php script which process the file, retrieves the pins to store them locally and save extra data (image name, width, height, description, board name associated) in a database or a json file. It's a one shot process, because to retrieve the last pins, you just have to parse the first page with a script runned frequently enough.

Feel free to check my pins, showcased with the help of Wookmark jQuery plugin + lightbox.

oroCRM installation tip

oroCRM is an easy-to-use, open source CRM with built-in marketing tools for your
ecommerce business.

As I like to install and play around with open source stuffs, I've installed it on my VPS at rootnerds.
User: jeff Password: admin

The oroCRM github README explains the basic steps (not in detail) regarding the install process.
From my own experience, here is the three things that I had to check/fix :

  1. check that you have given write access to usual symfony folders such ass app/cache app/logs and especially web/bundles
  2. it seems that libXml2 could make the application crash, so if you see in your log PHP fatal errors with a message such as "complex type 'call': The content model is not determinist.", you will have to make a downgrade. It was the case for me and has fixed the problem. I used the following version of libxml : (I'm using centOS 5.9)
    yum downgrade libxml2-2.6.26-2.1.21.el5_9.1
  3. The user interface being based on ajax requests, it could fails to load routes.js on some actions, use the following symfony command to generate the route.js ressource if it's missing on your filesystem.
    app/console fos:js-routing:dump --target=web/js/routes.js
    app/console assetic:dump
  4. That's all I had to check and fix to make it running smoothly.

How to install Google Chrome 28+ on CentOS 6

If you are using a linux distribution such as Redhat or CentOS and have tried to install chrome recently, you have received the following error message :

[[email protected] Downloads]# rpm -ivh google-chrome-stable_current_x86_64.rpm 
warning: google-chrome-stable_current_x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 7fac5991: NOKEY
error: Failed dependencies:
	lsb >= 4.0 is needed by google-chrome-stable-29.0.1547.65-220622.x86_64 is needed by google-chrome-stable-29.0.1547.65-220622.x86_64

To fix this, check the solution provided by Richard LLoyd.

Glances an Eye on your system

Glances an Eye on your system
Glances is a cross-platform curses-based monitoring tool written in Python.
It uses the psutil library to get information from your system.



$ port install glances

OSX display mac addresses for all network devices

networksetup -listallhardwareports

Chrome DNS page

Chrome has his own dns cache, to manage it, go to the following page


automate the use of apktool and dex2jar

I wrote a small php script to run in shell helping to use apktool and dex2jar to reverse engineer an android application apk file. You will get access to the androidmanifest.xml decoded, the images and java clases that you will be able to decompile with jd-gui. I'm using it to get some ideas how to organize projects and most of all because I'm curious and love to understand how things work.

The script is shared on Gist.

Syndicate content