Photos:

China pictures processed

 
0%
 
2008.04.27 @17:24 

XHTML + CSS Checkup

XHTML + CSS Checkup

You may not care... and you should certainly do !

I've spent several hours to "finalize" (as if it was possible in the IT world) the layout and the validation of the HTML + CSS. Not that it was hugely messy before but I never really tried to validate them precisely. I needed to code some h2 and h3 layout and since then I revamped what was not really compatible before.

As you could see... doesnt change anything.

Nice job. That was useful !

Yes, but still. While it was not too bad before (I wrote the code with the accessibilty in mind and the latest technics in 2005), it's always a good thing to improve the HTML semantic after a long time + the whole accessibility of everything by doing a second bunch of tests. Even if sometimes I'm really wondering WTF our lords of the W3C think sometimes. For example I wanted to stop being XHTML transitional (well after all it has been years now...) and start being strict. While 90% was already strict and 9% quite not too much of a hassle to do... There are some stuff like why the hell can we not use <ol start="4"> ? Will XML die out of it ?

There is indeed a new way to code numbers but lets be honest it doesnt really work on some of the latest versions of the main browsers so dont even think about it for the older ones... and the point is when this will be doable by FCK or other wysiwyg editors ? Not sure it will ever do. (ever = couple of years in IT)

Another thing as well is that you cant use the - yes ok it's evil - power of "document.write" javascript method during the loading of a page. Well actually it is not the XHTML1.1 strict that forbids it I think, it is the fact that you're more than welcome to drop the content-type text/html to application/xhtml+xml.

Well if you do that, most of the stuff will work (after quite some work)... but a lot of useful jack-of-all-trade tricks will just stop working. So for now on, instead of having to complexify all my javascript call, I'll stick to transitional and text/html.

Sorry, I tried but what matters most is the website to work, not to comply strict rules that are sometimes quite arguable...


2008.04.06 @22:18 

Postfix virtual users forwarding

Postfix virtual users forwarding

I've reinstalled completely my mail server with :

  • postfix
  • dovecot
  • ClamAV
  • ClamSMTP
  • postgrey
  • spam assassin
  • squirrelmail

Following these great articles. By the way in the first article, be sure you changed ownership of /home/vmail and everything below (domains etc...) to the vmail user or at least for him to rwx. If not your email will bounce to the recipient with the corresponding error message (something like "file or directory not found").

Everything worked as expected and quite quickly under ubuntu I must say... until I wanted to give to my users the same forwarding possibility as before (with qmail). With virtual users for some obscure security reasons (??), you cannot use the .forward (or .qmail) files !

"This agent was originally based on the Postfix local delivery agent. Modifications mainly consisted of removing code that either was not applicable or that was not safe in this context: aliases, ~user/.forward files, delivery to "|command" or to /file/name " from the postfix documentation.

Well in your /etc/postfix/vmaps you can specify redirections (john@doe.com -> johndoe@gmail.com) but you cannot save the email and forward it to one or more addresses like we often do for small mailing lists on "general" email addresses such as "contact@example.com"

As it seems it is not that easy to find a solution to this surprisingly bigger-than-I-thought small problem ! I haven't found  anything about this on internet. It's probably resolvable if you choose to store your emails in mysql (although I didnt try) but I like the old filesystem style better, easier for external scripting and it doesnt bother the database.

So I wrote a transport layer who does this. I hope it could be useful to someone.

Features :

  • no need to install an external program and should work with any postfix/imap/pop3 installation
  • deliver mails locally and/or forward to as many as addresses as you wish
  • supports aliases
  • if you use spam assassin (or another antispam which follows the same marking rules), the script can dispose automatically of your spam (delete or putting them to a server blackhole directory)

To install it :

  1. edit  /etc/postfix/main.cf and change : virtual_transport = mydrop
  2. comment your transport_maps line if any
  3. edit  /etc/postfix/master.cf and add at the end (there should be no spaces at the end of the lines)
  1. put the following script in /home/vmail/mydrop.py  and configure if needed the options at the top
  2. chmod +x /home/vmail/mydrop.py
  3. restart postfix with:  /etc/init.d/postfix restart

To use it :

By default it will deliver to the /home/vmail/domain/johndoe/ directories as before.
At any time you can create a ".qmail" file in each of the account's root (such as /home/vmail/domain/johndoe/) and as per the ususal .qmail files you can use on each line either "&johndoe@gmail.com" to forward to this email or "./Maildir/" (case insentive) to deliver locally. Example to forward to 2 addresses and keep locally :

 Let me know if you have any questions...

Note : you need to have all your domains and users to be in lowercase in your directories and your vmaps or you wont be able to receive emails in capitals.

[NOTE this has been updated on 4th of september 2008 to fix a bug] mydrop.py script :

 


2008.02.26 @22:02 

And you, what's your excuse ?

And you, what's your excuse ?

Why aren't you an artist, a scientist, a hero ?
Dont you feel the urge to be more than you, but no more than anyone ?
Dont you hear further than the noise of living ?
Dying of being average, simply replaceable copycat.
Arent you tired of your mechanical reactions ?
Dont you see the unbearable mighty numbers ?
Everything's temporary, transiting bodies and futile hapiness
Could you be more, do you have what it takes ?
Would you be able to salt reality ?
To deliver something new.
To create, invent, inspire.
Extirpate the divine out of you.
Build a death with a meaning.
To let the place tidier or cuter.
Dont you smell the fear of your own destiny ?
If life's a bitch, who's creativity ?
Craving to be high but you're too heavy.
Addicted to the very instants tasting god in your veins...


2008.02.11 @09:31 

PECL and PEAR memory problem

PECL and PEAR memory problem

if you had like me this kind of problem when trying to install or uninstall a package with PECL or PEAR:

Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 16 bytes) in /usr/share/php/PEAR/Registry.php on line 1012

Than your version of php is older than 5.2.0, either because you didnt reinstall it for a while or because you're under ubuntu for example.

After this version they figured out that the memory limit by default in PHP is 8M, which is very low, so probably you have all figured out how to increase this value in the php.ini !

Yeah but pecl and pear are not using the php.ini sadly, not even the "cli" version that you have under ubuntu or other installation. It is just PLAIN DEFAULT values.

So the trick is to edit the pecl script which is locate here under ubuntu (at least 6.10) :

/usr/bin/pecl

edit the last line where << exec $PHP ... >> is written and add << -d memory_limit="-1" >> just after $PHP, this should look like :

exec $PHP -d memory_limit="-1" -C -n -q $INCARG -d output_buffering=1 -d safe_mode=0 $INCDIR/peclcmd.php "$@"
 


2008.01.05 @12:37 

Subversion url change

Subversion url change

What if my repository has changed its url ?

Forget svn switch it will only work if the domain name has changed (and yes especially if you used --relocate)

You can checkout again. Yes, but what if you changed some of the files and didnt want to commit them ? And you dont want to check out again 350 MB of data ?

The documentation refers to a perl script. Well if like me you're allergic to perl and/or dont have it installed then under any version of linux you can find you should be able to do this in a "one-line" command.
 
Go at the top of your project then:
 
 
Pay attention to the intentionnally missing trailing slash in both urls above. To test the command please remove the mv part or redirect to another file.

Special attention for lucas.


2008.01.03 @18:35 

Express delivery package arrived !

Express delivery package arrived !

Hi, I'm nathanaël.

I weight 6.50 pounds and 19.685 inches high.

I landed on earth on the 2nd of January 2008 at 18:33 in "Chez Les Grangettes", a nice hostel with bed and breakfast and plenty of nice people around. Food is great. Not only mine but for my mother too - and I'm not against that !

I dont always understand humans, they have a huge balloon in here but they don't let me play with it ! Only my mother could...

Anyway I thought I was gonna say hello here since my parents insisted, trying to see how clever I was, and skilled with a keyboard. Seriously do you really think this thing is going to change the world ???

 

Le colis en recommandé est arrivé !

Le colis en recommandé est arrivé !

Hello, je suis nathanaël.

Je pése 2.950 kilogrammes et je mesure 50 cm.

J'ai atteri sur terre le 2 janvier 2008 à 18h33 "Chez Les Grangettes", un hotel chic type B&B avec plein de gens sympas qui s'occupent de moi. La bouffe est géniale. Pas seulement la mienne mais celle de ma mère aussi - et je n'en suis pas contre !

Je ne comprends pas toujours les humains, ils ont un énorme ballon ici je ne vous dis que ca ! Mais ils ne me laissent pas jouer avec ! Seule ma mère a pu ?!

Bref, j'ai pensé que je pouvais vous faire coucou ici, vu que mes parents ont insisté et que je les soupçonne de vouloir tester mes capacités intellectuelles... avec un clavier. Franchement vous pensez sérieusement que ce truc va changer le monde ???

 


2007.12.17 @21:59 

China - Preview II

China - Preview II

Time for a second sneak peak

Processing the pictures is quite a pain. Ah bloody digital photography : countless pictures saved, total liberty for editing them !

Fewwww I wish I could not change anything at all.

I'm just like Sisyphus...

 

 

On the left, well I'm sure you know what is it.

 

 

 

 

  

 

Below this is a bouddha from the Yungang grottoes. The small one on the right actually remind me of someone, you know somebody at his peak of power ?

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  

 

 

And here is the chinese solution to reduce CO2 emissions !

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Chine - 2ème mise en bouche

Chine - 2ème mise en bouche

C'est l'heure pour une seconde bouchée !

Retoucher les photos est réellement pénible. Ah qu'est ce qu'on aime la photographie numérique : peu ou pas de limite de  stockage, une totale liberté pour les retoucher !

Fiouuuu et si je préférerais ne rien pouvoir modifier ???.

Je ne suis qu'un autre Sisyphe...

 

 

Sur la gauche, je pense qu'il n'y a pas besoin de ... dessin ?

 

 

 

 

 

 

 Ci dessous un bouddha des grottes de Yungang. Le petit sur la droite me rappelle quelqu'un vous ne trouvez pas ? Si si un "grand" homme au sommet de son pouvoir ?

  

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  

 

Et voici la solution chinoise aux problèmes de transport en commun et d'émissions de CO2 !

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  

 

 

 

 


2007.12.16 @22:07 

Enchanted

Enchanted

I've just watched Enchanted... and pretty proud to find it great. Ok ok it's christmas and this is a disney movie : 2 reasons to avoid paying 17.-- CHF and get stuck watching an over-sweety "life is greaaaaat" kissy kissy piece of celluloid.

Don't get me wrong, some are great such as Mary Poppins - Julie Andrews is actually the narrator of Enchanted - but lately apart of the pixar productions, the disney movies and animes have not been very exciting lately.

This one is a touchdown. It's cleverly written, full of wit and even the usual nauseous songs are finally a real catch since they have their own logic in the movie... and dont be afraid, the good thing too is that they're kept to a minimum - the longest one being in the park.

The actors are quite good, especially Amy Adams who is just perfect in the role and James Marsden is impressive as the pain-in-the-ass "perfect" prince. Only Patrick Dempsey is just about average but is sufficient enough.

So whichever you're a little child, third ager or heavy metal biker, run to see this movie and if the christmas spirit is not coming to you... Let it snow because this is just a bloody good entertaining movie.

 

Il était une fois...

Il était une fois...

Je viens juste de voir "Il était une fois..." et plutôt fier de trouver ça excellent. Ok ok c'est noël et c'est un disney : 2 raisons d'éviter de payer 17.-- CHF et de rester scotché à un siège façon Orange mécanique devant un morceau de pellicule archi-sucré "tout le monde il est beau, tout le monde il est gentil".

Ne jetons pas l'eau du bain avec le bébé (comme c'est d'actualité !), certains films de ce genre comme Mary Poppins sont des chefs d'oeuvre - Julie Andrews est d'ailleurs le narrateur de Il était une fois... - mais dernièrement on ne peut pas dire que ce fut une veine dorée pour les films disney, si ce n'est ceux d'animation de pixar.

Celui ci est une réussite. C'est brillament écrit, plein d'esprit et même les habituelles pompeuses et nauséuses chansons se laissent écouter avec plaisir puisqu'elles ont cette fois une vague raison d'être présentes... Et restons calmes, la bonne chose aussi (surtout?) c'est qu'il n'y en a que peu, la plus longue étant celle du parc.

Le jeu des acteurs est aussi une composante de la réussite, en particulier Amy Adams qui est juste par-faite dans son rôle de princesse de conte de fées perpétuellement droguée aux effluves de bisounours et James Marsden vraiment impressionnant de tête-à-claqueries dans le rôle du "parfait" prince charmant (sans être trop lourd ce qui est une gageure !). Il n'y a que Patrick Dempsey qui ne s'en sorte quand même mais qu'à peine avec les honneurs.

Donc que vous soyez un bambin qui croit au père noël, un vieux croulant à qui on ne la fait plus ou un fan de tektonic piercé jusqu'au trognon, courez voir ce film et si l'esprit de Noël ne vient pas sur vous... C'est normal car c'est juste un bon moment à passer ! Et ca le fait !


2007.09.09 @21:22 

Pictures Widget

Pictures Widget

Ok I've been busy lately, my girlfriend took me on a nice week end off, weather has been bad bad bad and so on... plenty of excuses made me dont move on very quickly with the whole piccies thinggy. Who am I kidding ? It even kind of stalled for a moment ! But still I made some progresses... sort of.

So as I do am a clever guy full of ... wonderful ideas, I've lost spent some time to make a picture counter ! Yeah. And I still don't figure out why I've not received the nobel prize, don't I ?

Anyway, you can see on the left how far am I real time. God bless technology... and the holy ghost in the machine.

Compteur Photos

Compteur Photos

Ok, j'ai été pas mal occupé ces derniers temps, ma petite chérie m'emmena en week end, le temps a été plutôt désagréable etc... plein d'excuses qui ne m'ont pas véritablement fait avancer disons de manière respectable sur le projet P. (P pour Put... de Photos Pénibles)

Quoiqu'il en soit j'ai fait quelques progrès. Si on veut.

Comme je suis un garçon plein de ressources, je n'ai pas hésité un instant à prendre sur moi (au péril de ma vie bien évidemment) pour... faire un compteur de photos. Si si. Et moi qui me demande encore pourquoi je n'ai pas été nominé pour le prix nobel ?

Quoiqu'il en soit, enjoy (zut je suis du mauvais côté), profitez en bien pour suivre les chiffres passionnants d'une aventure photoromanesque du plus bel effet. Hitchcock en prendra de la graine niveau suspens.


2007.08.28 @12:26 

Internet Explorer CSS button display problem

Internet Explorer CSS button display problem

Problem of the day :

under IE if you want to have buttons without too much space on left and right ( which cannot be removed by neither margin:0 nor padding: 0 ), you can use this trick : { overflow: visible; } which works on all version of IE.

But you may just trigger another bug in IE7 : when you scroll the page the buttons display start to be corrupted ( they disappear / vanish pieces by pieces) and fixed only if you move the mouse pointer above them ! Cool...

This is because you used the directive { height: ...; } which seems to make IE try to "stretch" the box and therefore triggers these problems.

To fix this you just have to use { line-height: ...; } instead of height and this will work better in FF as well.

Example of a nice button : (without the complete rules as on the trick above)

 

PS: yes I really need to implement some styles for the code !

[EDIT] : done!