Http responses – php

Il peut s’avérer intéressant de récupérer le code renvoyé dans la réponse HTTP dans un script.

Quelques codes comme exemples :

  • 200: OK
  • 302: Déplacé mais trouvé
  • 403: Accès interdit
  • 404: Page Introuvable
  • 500: Erreur serveur

Voici comment faire (je vous fourni un bout de code commenté, des explications plus complètes se trouvent en dessous de ce dernier) :

Read More…

Posted in Web at February 14th, 2010. No Comments.

Include handling rar archive on Nautilus

I observed that people are looking for install rar on nautilus.

In fact, it’s very simple, first, we open rarlab page.

We have to choose between the ‘normal’ (x32) and ’64 bits’ (x64) version.

What is your architecture ?  You can know that by typing these command.

uname -i
x86_64

Here, is a 64 bits architecture and I will download the right file (x64) (32 bits version is here).

Open a CLI, and go to file. After that, you must extract and install.

$tar zxvf rarlinux-x64-3.9.2b1.tar.gz #extract

$cd rar/ #go into directorycreated

$su #switch in root mode

#make install #simply install

It finished, enjoy it.



Posted in Linux at January 31st, 2010. No Comments.

Merge & convert AC3 5.1 in Mp3 Stereo lame

I consider that we have 3 AC3 files :

  1. Sample1.ac3
  2. Sample2.ac3
  3. Sample3.ac3

Merge files

We want to merge these 3 files. Simply use the cat command :

cat *.ac3 > All.ac3
#normally *.ac3 tell
“Sample1.ac3 Sample2.ac3 Sample3.ac3” properly sorted. If you have a doubt, you will be allowed to use the full sentence.
cat Sample1.ac3 Sample2.ac3 Sample3.ac3 > All.ac3

The 3 files merged in one All.ac3.

Decode AC3 file

Lame doesn’t be able to read AC3 files, so we must convert them. a52dec is a decoder of ac3 file to a lot of format (oss, ossdolby, oss4, oss6, wav, wavdolby, aif, aifdolby, peak, peakdolby, null, null4, null6, float).
Here, we use “wav” type output. The program decodes specified file to stdout and we must use operator ‘>’ like that :

a52dec -o wav All.ac3 > All.wav

This command downmix the 5.1 stream into full stereo stream (with channel level adjustment (-3, 0, + 3dB for instance) based on output mode). You can disable this with add a ‘-a’, use man for the rest.

Read More…

Posted in Vidéo & Audio at January 16th, 2010. 5 Comments.

GEOMETRY

When you have in options to a nautilus for instance :

–geometry=GEOMETRY
Create the initial window with the given geometry.


Read More…

Posted in Linux at January 10th, 2010. No Comments.

nVidia Kmod install for fedora 11, 12

Don’t do like me. And install your KMod-Nvidia correctly :

Like that

Posted in Fedora 12 at January 8th, 2010. No Comments.

PacMan Ring

A very beautyfull (or not) but so funny gift for your girlfriend if she is a geek :

The fun ring for geek (click on for see the source of article)

For complement :

An other ring

Earrings wich are also fun

Earrings wich are also fun

Posted in A voir at January 8th, 2010. No Comments.

Dad, Mum and Nounourse

Evil mum hit my dad because he sticked out his tong to my mother and she found that not very polite .

Me, Super Nounourse, who don’t like that, hit evil mum and told her Dont hit my daaaaad”.

My mother told me “If I can’t hit your dad, I will hit you then !” and me, after that, says “No, no don’t hit me, hit dad instead”

Dad who was dying, beat up, sent off Nounourse for punishment to the pillow in the corner.

Ceci est de la fiction et/ou du pur délire et n’a pour but que d’améliorer mon anglais.
This is fiction and/or pure madness and has just for goal to improve my english.

Posted in Improve my english at January 8th, 2010. No Comments.