mardi 22 décembre 2009

[Firefox] Déménager avec ses plugins

J'ai souvent eu à faire des cauchemars à l'idée de devoir toujours télécharger mes plugins à chaque installation ou quand je dois utiliser le navigateur de quelqu'un d'autre ou dans un cyber ;-D

Mais depuis un baille, j'ai trouvé le truc et je me suis dit aujourd'hui pourquoi ne pas le dire (ça peut toujours servir je crois ;-)).

1- Aller sur le site de firefox

2- Aller sur la page du plugin

3- Aller sur la page des différentes versions du plugin (au lieu de cliquer sur "Installer")

4- Choisir 'Enregistrer sous' pour télécharger le fichier "xpi"

5- Pour l'installer il suffit de "Cliquer & Déplacer" (Drag and Drop) le fichier xpi sur le navigateur; confirmer l'installation et redémarrer.

* Il peut y avoir le risque d'incompatibilité de version.

NB: Si vous voulez copier un plugin déjà installé vous pouvez rechercher 'le nom du plugin' et copier le dossier ou trouver le répertoire "ext" (variable) où les extensions de firefox sont sauvegardées.

Have fun ;-)

[Drupal] Views Error occured !!!!!

Un constat bizarre : En voulant personnaliser une vue je n'ai cessé d'obtenir le message
"An error occurred at /drupal/admin/build/views/ajax/preview/".

J'ai au premier abord installer/désinstaller les modules "devel", "Admin menu", "Menu".
Puis après j'ai activé le 'clean url' la réécriture des liens.
Mais peine perdue.

Un tour sur le net m'a dabord rassuré que je n'étais pas le seul à avoir ce problème.

J'ai finalement résolu le problème en installant PHP 5.2.9 comme l'a suggéré quelqu'un (Xammp1.7 au lieu de Wamp 2).

Mai je me demande toujours pourquoi cette solution pour ce problème ??????

[LINUX-WINDOWS] Augmenter le temps de boot d el'OS

J'ai fait du dual boot WinXP et Mandriva Spring 2008; et je devais augmenter le temps de choix du système d'exploitation à démarrer.
Pour ce faire, aller dans :

Menu > Configurer son Ordinateur > Démarrage > et augmenter le temps (en seconde).

NB: Il faut être root avant de pouvoir accéder au panel de configuration.

NB: Pour mon cas j'avais oublié le mot du passe du 'root' j'ai donc modifier le mot de passe du root en premier lieu (

Thanks à la communauté de linuxtg

[LINUX] mot de passe root perdu ?

Mes dernières larmes ont été versées tout dernièrement parce que j'ai oublié le mot de passe du root de mon linux (Mandriva Spring 2008).

1- Démarrer en "single user"
- en passant "1" comme paramètre à la commande d'amorçage ou
- en choisissant ce mode si déjà disponible

2- Au prompt taper la commande "passwd root" pour modifier le mot de passe du root (vous devez confirmer le mot de passe). Redémarrer le système en tapant "reboot".

Thanks to Danny ;-)

samedi 5 décembre 2009

Linux Shell Renommer en minuscules des fichiers

Je cherchais un code pour renommer une liste de fichier en minuscule
(j'ai installé de nouvelles polices sous linux et leurs noms sont en majuscule);

rename 'y/A-Z/a-z/' * ; find ./ -type f -exec rename 'y/A-Z/a-z/' {} \;

Le code originale en 2 lignes que j'ai remis en 1 est ici :

Have fun !!!

samedi 14 novembre 2009

A new drupal website !

I will be busy "twisting" this new website so watch outtttt !!!

A static (maybe html) website based on Drupal ?

I am experimenting a trcick. Why shall I use drupal for a website of 5 static pages ?
Why shall write all the necessary code (old time's way of creating a website ?) ?
Why not to combine both technics ?

What I tried is
1- to create the web site using drupal will all modules needed.
2- then I save all the pages from the browser (File > Save As).
3- change links to pages in all files (use of php in other to "include" pages)

The main advantage is a very light website.
But will that be fine enough ? (because I need now to find a "cool" way for the updated versions of the pages)

To be continued ...

mardi 1 septembre 2009

A new patch for Jammer

I was for many drupal projects, looking for a way to hide "optionnally" some blocks on the node add/edit form. And last week just before starting to code (because I can not go around the need anymore :-)) I found a cool module: Jammer

It is doing what I exactely wanted except giving me the list of blocks I want. But because the code was cool I easily added the missing feature. Find the patch here

The next step I am thinking of is to allow the user/admin to give directly the form element_id instead of giving a fixed list of elements that can be removed...

dimanche 24 mai 2009

Gmail tips - How to win the battle against your 1000 mails in your inbox?

I personnaly don't like having my inbox full; I feel tension coming, too much things to do, I may miss important mail (from you for example :-)). So I have been trying many "technics" and now I am always the winner.

So this is the recipe:

Tip1 : Don't let the enemy impress you, use Filters
While creat ing filters you can choose some actions (Archive, Assign a label, Delete, etc.). So for example for some of your newletters, you can decide to archive them and add the label "LI_Newsletter" (less inportant newsletter).

Tip2: Point all you enemies use Labels (each one of them has specific attack strategy)
Adding Labels (tags) to mails helps first to categorize them. A mail can have as many as label/tag as you want so you can abuse. It also makes life easy when you need to do some actions on a type of mails (see mails from your boss for example :)).

Tip3: Don't let the enemy use the "surprise attack technic" Mark as read
If you know what the type of a mail you don't obvioulsy need to read it (at least now). Thus by marking a mail "read" it saves you a lot of time.

Tip4: Remove dead enemies from the battle field Archive
DO remember that the main goal is to have our inbox as empty as possible. So if we don't need to keep useless mails in the inbox. By useless mail I meant mails we won't read soon, we will no more check, mails that can be delete, etc.

Once you won many battles we can go to the next stage that is "Party time" because we have now an empty inbox ;).

mercredi 22 avril 2009

Drupal: Integrate Feedly shared links

I am pretty sure you have heared about Feedly (, a firefox plugin, a feed reader integrated with Google Reader (all your feeds can be read in feedly and what you share in feedly is accessible in Google Reader) .

Now my dilemma was to get "feedly shared links in my drupal instance". ?????????

I first as usual went to the headquarter ( :)) but nobody seemed interested by feedly right now. Then I changed my search; if I can get the Google Reader feeds that are shared then all shared links from feedly will be in the list (I can't imagine a better day ;-)).

So I went back to the HQ and I found 2 modules (don't ask me how :))
  • Activitystream: (thanks to akalsey )
  • Activitystream_greadershared: (thanks to eojthebrave)
The first module is an API for "streams" created in other platforms (delicious, facebook, etc.)
The second, that is a patch/module, gets shared feeds from Google Reader.

How to use them ...

1- Download and install (enable) both modules
2- Get your Google Reader user Id ( in your google reader, click on the “Shared items” and then “Show details”). The user id is displayed in this format Feed URL:
3- Go to "My account" in your drupal instance
4- Paste your Google reader user Id in the “User ID Number: “ field

And you can start going home ;-)

mercredi 15 avril 2009

A new drupal module: userdashboard

I am working this last days on a new drupal module "userdashboard". You will probably say "another module?", "what is so cool about it?", etc. And you may be right but I need to tell first why this new module needs to be checked.

- The dashboard feature ...
Having my page, with my 'content containers' that I can arrenge as I want is something we all look for when we visit a portal/web site.

- The key here is the fact of using 'blocks'...
A block can have all type of information and in case a module is not providing a block that by default the 'views' module is there to help to display the content generated.

So the idea is that if I can display blocks , I can display everything I want (at least what the site admin want me to :), he is the boss).

Thus the module is allowing the admin to select 'allowed' blocks, that the user can 'manage' and then be able to view them on his dashboard.

There are things (especially the UI) I need to improve but I think this can ROCK...

Now why don't you take a look at it and tell me why I should stop/continue dreaming about it ? :)

lundi 13 avril 2009

How to add Google analytics to your blogspot blog ?

I finally figure out how to get and see statistics of my blogger blog (when I think I almost shifted because of that hehehe)...

Anyway I was searching and found some tips but they were not working. The main cool tool often mention is Google Analytics BUT it wasn't working for me because for security purpose "the code of google analytics" was parsed (the javascript code).

So before start yelling :) I thought of paying a visit to blogger's gagdets and I realised that this was in fact THE INSPIRATION :).

So now that it is working I'll show you the way, follow me ...

1- Create an account on Google Analytics (I won't show you how to do it, at least not today:) )
2- Copy the javascript code to your blog address
3- In your blogger administration panel go to "Layout" > "Page elements"
4- And in your footer choose "add a gadget" (you may need this
5- Choose an "HTML/javascript code block" and paste the google analytics code in the block content.

And you are done. From now on you can view cool statistics for your :)

mercredi 1 avril 2009

Drupal: Modifying core code

I was thinking of one of the best way to "touch" core code (drupal or contributed modules).
This aspect matters when an upgrade is needed. The easier it is the happier you are.

And right now I think I find a "smooth" way.
Let's assume I really need to change the node_save function in the node.module file (I know you were saying: "ALWAYS TRY TO AVOID TOUCHING people's code" :-)).

1- I'll rename the default function to mv_node_save (in node.module) for example.

2- Include, in node.module, my file modif_node.module created in "sites/all/modif_code/modif_node/". And in my new file i will put the code in the node_save function.
So my new instructions will be taking into account without having to do many 'gymnastics'.

3-Keep track of patches : Once the code is in production (basically after major testing), generate patch file to keep track of what has changed. So in my case node.patch will mention only my include and the function renamed.

Thus the day i will need to upgrade, i will change only my code and maybe rename function.
I need to check all this and probably think of some details after some projects.

But I think this approach will make life less painful every time the "upgrade" word is appearing somehere :-).

! test and see ...

mardi 24 mars 2009

Drupal : Override strings without touching the code

What's up ?
I was trying to implement the "wall to wall" feature using the guestbook drupal module when i noticed that it will be more funny if the user can see wall instead of 'guestbook'.

So ...
So the question now is how do I change the string without touching the module code ? :-? (i don't know if this smiley exists :-))

The vision ...
Then i got a vision :-). Promise me that you won't laugh.

I remembered that when you are using another language in drupal the string displayed is in english only if the language is not enabled or if the string is not translated. Thus if i create a language, enable it, and translate only "guestbook" to "wall" then every where a string should be displayed only guestbook will change to wall and the rest will be in english !!! Isn't that cool ? My mum said that i'll be a good drupaler hehehehe (even though she doesn't know what drupal is :-D).

Don't worry my mum said also that you can be a good drupaler!

How can you do the same thing ?

1- Enable the "locale" and " modules
2- Create a fake language (mine is called fake with the code fk-fake) on /admin/settings/language/add
3- Make the fake language the default one on /admin/settings/language/
4- Search and translate the 'guestbook' (or the string you want) on /admin/build/translate/search
5- Be happy.

PS: In case you can't find the string when searching check if the t() function is used in the module.

vendredi 20 mars 2009

Firefox : Can 2 profiles share one history file ?

I was wondering if it was possible to have many profiles with one history file ? In case this is possible I can have the same autocompletion in all my profiles.

So let's start the investigation (Sherlock Holmes...)

1- I searched what was related to 'history' in one of my profile folder.
I found that:

- Firefox is using 'sqlite' as DBMS (hmmm interesting)
- There are many databases : places.sqlite, and many other sqlite files (content-prefs.sqlite, cookies.sqlite, downloads.sqlite, formhistory.sqlite, permissions.sqlite, places.sqlite, search.sqlite, urlclassifier3.sqlite, webappsstore.sqlite).

2- I started opening some of them and I focused on places.sqlite.

3- I created a link of profileA/places.sqlite in profileB/places.sqlite and rename profileB/places.sqlite. So now i have only profileA/places.sqlite. But I was surprise to see that when I start the 2 profiles, B is working fine but A has lost its memory. There is no autocompletion available for A even when i go to an address that i opened in another tab.

4- After some magick manipulations :-) what I understood is that when a profile is accessing a database, the file is locked so that another profile can't access it at the same time.

So the answer to my question is right now no (because you may never know), 2 profiles can't share the same history file.

BUT I was thinking that a small script (shell or firefox add-on) can update the history (or other databases) on the event 'close firefox' or '... event' :-)

Maybe I'll try it a friday night ... (friday is said to be the inspiration day :-))

See you next time for euuhhh i don't know, we'll see :-)

dimanche 15 mars 2009

Drupal : Change the installation language

Here are the steps to follow when you want to translate the installation interface of drupal.

1- Download the language package from

2- Copy from the extracted folder of the translation package (french in my case) the 'translations' folder "fr-6.x-1.0\profiles\default\translations" .

3- Paste the folder in "mydrupal\profiles\default".

4- Go and select your language on the installation page.

and here are the installation screens.

mercredi 11 mars 2009

A cool blog i just discovered !!

From somebody close to the drupal dream team :-)

She is called Sacha, she writes well, she is into Drupal, she was at the last Drupal Con 2009 so , read it, bookmark love it :

jeudi 5 mars 2009

Twitter updates on Drupal

I integrated Twitter in Drupal today !!

Nothing special maybe but it was funny how easy it was. You can also do it in 15min.

All you need is to
- go to this page (you'll need a twitter account even if the updates will be for another account).
- follow the instructions :
+ choose the flash or html widget,
+ choose the number
+ choose the title of the posts' area

- copy the code generated and put it in the content of your block or wherever you want to display it.


-- Hot tip! To ensure loading of your page even in the case of non-loading, move the two lines that start with < type="text/javascript"> to the bottom of your page (just
above the closing 'body' tag )

-- Use the "full html" for your block content in case you are using one to display the updates.

And that's it :-)

mercredi 4 mars 2009

Weird message regarding the Firefox 'Friendbar' add-on

I have noticed something funny and weird today.

Friendbar (, the cool add-on for firefox 'seems not available for linux' when you try to install it on your firefox using Linux(Ubuntu).

But when i download the extension on windows and copy it in my firefox profile on Linux it works like a charm :-).

So my doubt now is about the message I read; is the add-on really available for linux or not (or maybe sometimes it's available and sometimes not) ?

Can you tell me ? yes you why are you smiling, if you know just answer ...

Combine Friendbar with Firefox Profile

Hello folks,
One more funny tip for today .

This add-on will display all updates of your twitter and facebook accounts. You can search on twitter from the same toolbar. You can also change settings like (the update time, the number of latest updates, etc.).

The link with Firefox profile Manager ?

You may not want to always see updates when working or maybe the currrent firefox profile (we use the default profile when none is created) has too much extensions.

So what you can do is to create a new firefox profile before installing the add-on.

Don't cry i'll show you how to do it ok :) ?

1- Start firefox with the '-ProfileManager -no-remote' option

(windows) "C:\Program Files\Mozilla Firefox\firefox.exe" -ProfileManager -no-remote
(Linux) > firefox -ProfileManager -no-remote

2- Create a new profile (mine is called the social_boy :-))

3- Go to the add-on page and install it. You'll need to restart the browser.

4- Create a shortcut to your new profile
(windows) "C:\Program Files\Mozilla Firefox\firefox.exe" -P social_boy -no-remote
(linux) > firefox -P social_boy -no-remote

(change social_boy with your new profile name).

Now that you know how to do it you can cry :-)

dimanche 1 mars 2009

Development tools are important ...

I am more and more aware of the fact that tools can make the difference between 2 developers having the same level. And today when "be able to deliver tasks/projects as quick as possible" is the sucess key we need to know the right tool to use at the right time.

Here are some steps in case you also agree with me (i know nobody wants to change his tool but think of how you can finish quickly your project and watch a cool nice movie :-)) ...

* Know the limits of your tools

Think of how you do things (display line numbers, duplicate a line, etc.) ; if you think you should do it in an easier way then it's time to go back to the tool user guide (I rarely read this precious document before using tools ;-)).
In case your favourite tool doesn't have that feature, don't panic , don't shed tears. Search for other tools having that in addition of the features of your favourite tool.
There is no use to leave a tool having 10 features to another one with less feature.

* Try different tools

It's only by doing so that you'll know if your 'everyday' tool is enough. And the more you try tools, the more you master them. This step will help you identify by yourself what exactely the tool is capable of.
You can for example use Fireworks for images but it's better to work on photos using other tools like Gimp. You can code 1000 lines with Vim but if in Eclipse you can have colours and collapse block of code hmmm...

* "Don't forget me please " is your favourite tool saying :-)

Love a tool but be able to use all tools. Depending on situations you'll have to adjust (on servers you won't have IDEs; you'll need to resolve issues with the old vim ;-)).
You can still code with your notebook at home (in your small room, on your small notebook, with your small drink, while praying that the small packet of chips never finish -i know you like small things-) BUT at office, on project you should think of going faster.

Now i know 1950's geeks will comment saying that they can do as fast as today's tools but it's okay, we are in 2009 :-D

jeudi 26 février 2009

How to start giving a good presentation ...

I used to hear some friends saying that they can not give a presentation (one even said that they day he will try, people will be snoring ;-D).

Nobody is born 'good speaker'; even if you may have some aptitudes you need to PRACTICE.

Here are some tips to help you in your journey to become a good speaker.

- Start being passionate by people who give good presntations, and think to become as good as them one day. The more you will start being interrested, the more you will read about it , meet people with the same passion.

- Watch a good movie (included animation movie, i personnaly love this type of movie because of many voices you can hear) more than once, not only for the story, but also to SEE how people talk, the gestures they use, their voices,etc. You can pratice with any movie you like. The idea is to imitate people talking as good as you want.

- Learn some small speeches (or sentences) and repeat them from time to time (I used to repeat Lincoln's speech, 'the Gettysburg address').

- When you attend conferences or presentations, pay attention to HOW the speaker is behaving and try it later at home (you can do it alone in the bathroom, the place doesn't matter, but don't forget to take your bath hihihi).

- Start giving presentations every time you can, don't think you will be perfect, you may be good. Think after of what you didn't do well and why it happened like that so that next time you can do better.

- KEEP in MIND that it may be a long term process and that you'll always find a small tip by watching others.

By the way did i mention that you need to dream of being a good speaker ? This is the starting point... ;-)

I just mentionned here some basics steps to guide you; I'll mention later some things that make the audience feel "NOT HAPPY" when you speak.

I need to go now because i have to practice in the bathroom :-D.

mercredi 25 février 2009

If I know drupal ?

I was asked yesterday if i knew drupal ?

One year back, i'll have answered "yes, but i prefer other cms (especially joomla)".
Today i'll say of course i know Drupal.

I didn't find it enough intuitive some months ego (and i am not the only one) but i have to admit that once you understand how it works, you will enjoy it.

I will start posting some tips, new things about drupal every time i can ;-) (why are you smiling , don't smile i am serious :-)).

By the way , Drupal just released 2 versions 6.10 and 5.16, why don't you just try it ?

vendredi 20 février 2009

Sun Tech Days Hyderabad 2009

Sun Tech Days : Wednesday 18th to Friday 20th of February 2009.
Day 1: Wednesday 18th

Welcome speech

- Amazing Kid of 11 years old playing many drums at the same time
- 3 Demos Desktop Virtualization + Shark JavaFX + Java TV - Sun box-)
- Sun India CEO speech
- James Gosling talking about the evolution of Java (java is used every where)

[NetBeans 6.5 what's new ?] Angela Caiceda

- Internal File versionning control
- Refactor preview
- Fix import
- Help used to find some menu used
- Database management
- Code completion formating
- Code
- Import from eclipse project

[Glasfish & the future of Java EE] Arun Gupta

- Application server
- Open source version
- Commercial version (Monitoring tools)
- Sun Communication server (demo of 2 phones calling each other)
- Project deployement
- Clustes management
- Version 2 coming with Netbeans 6.5

[Netbeans with Php development - HOL] Justin Bolter

- Debug step by step as a client side language
- code completion
- code template
- Objects view,etc.
- Drag and drop html elements

Day 2 : Thursday 19th

[New way of working with Swing] Lee Chuck

- "Bind"
- Splash screen
- Nimbus for the design aspect (you don't have to know how Swing works)
- Display on different screen (class Graphics to help you identify the device)
- User experience (
java icon,
Field getting focus onload of the application,
pressing enter to validate as form,
build an application with a tray icon,
undecorated window to display any kind of window (a cat walking on the screen),

[UML Modelling with Netbeans] Ashwin Rao

- Design Pattern
- For more efficiency, some elements have been removed (unused UML diagrams)
- Synchronous manual (Code generated and diagrams generated)

[Get involved in Open source projects]

[Restful HOL -Hands On Lab-]
- Glassfish (application server basically but can do more than that)
- Webservice

[Java Mobile]
- JavaFX :with his magick bind method. The bind method basically allows you to change the value of one variable dynamically. Ex: if i bind x to y and if y is changing (on drag of an image for example) i don't need to worry about coding to update x.
- More classes to make the programming easier

[Mobile and Embedded Java Update]
- Magic pen piano (a demo where the piano keys were drwan on a paper and with a pen the person was able to play the notes awesome).
- Java Sun Spot (used for robots, chip)
- Golf swing measurement (using the Java sunspot)
- Java Phone (LWUIK)

[Personnal impression]

{Pros - things to remember}
- demo must show new interresting things
- the way people were presenting
- HOL are available for people after the event (because it is quite impossible to finish them and ask questions if you are new to the technology)
- You can ask questions on the author blog
- Importance of local teams in open source project (the maintain the group when you are gone :-))
- The place and decoration is better than the website of the event :-)

- Marketing of "NetBeans"
- JavaFX is for animation but the environment is not yet as easy for designers (compare to Flash); its more for java developpers who want to do animation.
- Eclipse has already many of the "new features" (many plugins) . So you can choose Net Beans or whatever tool you want but don't become slave of the tool or ... ;-D
- You can't ask questions in the room (i guess because of the busy schedule and so many people willing to ask more and more questions ...).

I was a cool event anyway, new environnement, new people especially for a guy like me who is not java java :-D.


mardi 10 février 2009

Bazaar : un outil de gestion de version de fichier

Je suis tombé amoureux d'un outil depuis quelques mois, et oui :-).

Qu'est ce que c'est ?
Bazaar, est un système de contrôle de version. En d'autres termes il te permet de d'aller d'une version A10 a une version A20 (et tu peux retourner a la version A5 dans la même journée :-)).

En quoi peut-il m'aider ?
- A maintenir ton fichier (un fichier de code ou non); aller d'une version a une autre;
- A gagner en temps : lorsqu'une version du fichier contient des erreurs tu peux:
+ retourner a une version 'propre', ou
+ comparer la version propre et la version erronnée (ces cas sont tres utiles pour les instants magiques de debogage :)).

Particularités ...
- Multiplateforme
- Facile a comprendre (il m'a été plus facile de travailler avec Bazaar que ses cousins CVS et SVN). Je le conseille pour les débutants dans le domaine des outils de SCV.
- On peut l'utiliser sur une seule machine (on n'a pas besoin d'avoir un serveur)

Et il a un joli logo :)

References :

- (site officiel pour les téléchargements, la documentation en anglais,etc.)


A suivre (d'autres articles plus techniques et plus détaillés)...

lundi 9 février 2009

[Getting Real]

Un document écrit par la société 37Signals. C'est un guide pour ceux qui voudraient concevoir des logiciels “simple et propre” (expression personnelle pour désigner quelque chose de presque parfaite :-)).

Je détaillerai dans de futures articles certains aspects abordés dans le livre. Mais j'aimerais mentionner que ce guide fait partie des références à consulter pour ceux qui voudraient faire leur petit bout de chemin dans le monde de l'environnement web.

Quelques chiffres :
- Le guide a fait référence a au moins 26 grands auteurs.
- La version anglaise (pdf) du guide fait 177 pages et comporte 14 chapitres.
- La societe 37signals a 5 produits commerciaux et est l'auteur du fameux framework “ROR – Ruby On Rails” .

Le livre a été traduit en d'autres langues et la version française, gratuitement consutable en ligne, se trouve a l'adresse