Vahid Ghafarpour's Blog

نكات جالب از نظر وحيد غفارپور!

Monday, February 26, 2007

Le petit prince

L'essentiel est invisible pour les yeux

What is essential is invisible to the eye

and a nice quotation
http://www.cjvlang.com/petitprince/foxsecret/invisiblef.html

Labels:

Saturday, February 24, 2007

NFS Ubuntu

I start new NFS/NIS server with ubuntu server 6.10 instead of RH
after setup we found many problem in files. at last I saw that I have some directories that I can't see for example
in .mozilla/firefox my user has rwx permission but I can't get `ls`
after some try I found that if I get rwx permission to group it's become ok
at last I found that if I put no_subtree_check option in /etc/exports it become ok

WTF

Labels:

Wednesday, February 21, 2007

PHP MySQL connection collation

To change the connection charset permanently to UTF-8, add the following line in the [mysqld] section:
[mysqld]
init-connect='SET NAMES utf8'

The other way to let MySQL know what connection charset you intend to use is per-connection based. After a connection is established (with host, name, password), add the following two lines in your application:
SET NAMES utf8;
SET CHARACTER_SET utf8;

Labels: ,

Ubuntu and LVM

install packages
sudo apt-get install lvm2 dmsetup mdadm reiserfsprogs xfsprogs

find your LVMs if exists
sudo vgchange -ay

you can see with
sudo lvdisplay

if you get something like
No program "lvdisplay" found for your current version of LVM
(lvdisplay is you program name)

you should do this:
sudo cp -r /lib/lvm-200/ /lib/lvm-0

now you can mount

Labels:

Tuesday, February 6, 2007

Illegal mix of collations for operation 'concat'

problem
ERROR 1271 (HY000): Illegal mix of collations for operation 'concat'

as a result of


mysql> show variables like "%character%"; show variables like "%collation%"; +--------------------------+----------------------------+
| Variable_name | Value |
+--------------------------+----------------------------+
| character_set_client | latin1 |
| character_set_connection | latin1 |
| character_set_database | latin1 |
| character_set_results | latin1 |
| character_set_server | latin1 |
| character_set_system | utf8 |
| character_sets_dir | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+
7 rows in set (0.00 sec)

+----------------------+-------------------+
| Variable_name | Value |
+----------------------+-------------------+
| collation_connection | latin1_swedish_ci |
| collation_database | latin1_swedish_ci |
| collation_server | latin1_swedish_ci |
+----------------------+-------------------+
3 rows in set (0.00 sec)

fix it with

set collation_database=utf8_general_ci;
set collation_connection=utf8_general_ci;
set collation_server=utf8_general_ci;

Labels:

Sunday, February 4, 2007

apt key sig error

he last half of the large number above is the key number, for example 437D05B5. You can check if the key is in your key ring with (as root):
apt-key list

If the key is there I don't know what is up, But if it isn't then you need to get the key and add it to your keyring.

As root:
gpg --keyserver hkp://subkeys.pgp.net --recv-key 437D05B5
gpg --export --armor 437D05B5 | sudo apt-key add -

http://ubuntuforums.org/showthread.php?t=345930

Labels:

Wile E. Coyote and Road Runner

Wile E. Coyote and Road Runner


It's an eternal battle of need versus speed, aggravation versus acceleration. Throughout Road Runner and Wile E. Coyote's careers in over two dozen Warner Bros. cartoons chronicling the duo's encounters, their classic chase formula has never lost its tension. The luckless Wile E. comes up with increasingly elaborate and seemingly foolproof schemes to snag Road Runner who, oblivious to the danger, always eludes the pathetic coyote's painstaking plans. According to Chuck Jones, the duo's creator and chief director, in Chuck Amuck: The Life and Times Of An Animated Cartoonist, he and the artists behind the Road Runner and Wile E. cartoons adhered to some simple but strict rules:


Rule 1: Road Runner cannot harm the Coyote except by going "Beep! Beep!"


Rule 2: No outside force can harm the Coyote -- only his own ineptitude or the failure of Acme products. Wile E.'s ineptitude, possibly a by-product of his distracted obsession with catching Road Runner, is compounded only by the Acme company's products - which may work for other customers, but seem never to work for Wile E., who repeatedly risks life and limb counting on their effectiveness. In Operation: Rabbit, for example, Wile E. constructs an elaborate Acme-manufactured contraption guaranteed to catch Bugs Bunny. Inevitably, the apparatus fails and Wile E. is defeated once again.


Rule 3: The Coyote could stop anytime -- IF he was not a fanatic. (Repeat: "A fanatic is one who redoubles his effort when he has forgotten his aim." - George Santayana) Of course he can't quit; he's certain that the next attempt is sure to succeed. He's the personality type that twelve-step programs are made for. Of course, first you have to want to quit.


Rule 4: No dialogue ever, except "Beep! Beep!" Oh, and the occasional dialog sign that comes in handy just as Wile E. realizes that his efforts are going to bring him nothing but big pain.


Rule 5: Road Runner must stay on the road - for no other reason than that he's a roadrunner.


Rule 6: All action must be confined to the natural environment of the two characters -- the southwest American desert. That's because there's everything you need for a funny cartoon in one place: winding roads, peaks, canyons, cacti, and boulders, all of which defy conventional physics. In Chuck Jones' classic There They Go-Go-Go!, the starving Wile E. resorts to creating a chicken out of the desert mud. When the speedy Road Runner whizzes by, friction causes the road and Wile E.'s feet to catch on fire, sending the coyote into a frantic craze, in which he attempts to capture his prey with a rope, a sling-shot, a rotating circle of spiked balls, a booby-trapped ladder, and a pile of rocks.


Rule 7: All tools, weapons, or mechanical conveniences must be obtained from the Acme Corporation. Talk about the first real example of "branding" in American commerce! Of course, not even an Acme brand Burmese tiger trap, an Acme brand steel wall, or Acme brand muscle-building vitamins can help Wile E. catch-up to the supersonic Road Runner in Stop! Look! Hasten!


Rule 8: Whenever possible, make gravity the Coyote's greatest enemy. Another Chuck Jones' classic, Scrambled Aches, has Wile E. watering a rock in order to grow it to boulder-size so he can crush Road Runner flat in his tracks. In true Wile E. style, the rock expands just as the tottering coyote lifts it over his head, letting gravity take its course. It's the law, you know.


Rule 9: The Coyote is always more humiliated than harmed by his failures. Easy for you to say.


Rule 10: The audience's sympathy must remain with the Coyote.

From Beep, Beep to Zipping Along to Freeze Frame, and despite his constant failure, fans continue to love Wile E. Coyote and his always one-step-ahead costar, Road Runner.



Catch up with Wile E. and Road Runner at the Looney Library. It's fun for you and the kids.



See what others are saying about Wile E. and Road Runner right now. Click here to enter our message boards. Did you ever realize that in all the Road Runner and Wile E. Coyote cartoons, no outside force harms the Coyote -- only his own ineptitude or the failure of Acme products?



How about a Buddy Icon? Check out the Looney Loot, screensavers and more. Click here to get some Looney Loot.

http://en.wikipedia.org/wiki/Wile_E._Coyote_and_Road_Runner

http://looneytunes.warnerbros.com/stars_of_the_show/wile_roadrunner/wile_story.html


Labels:

Saturday, February 3, 2007

Why Windows is less secure than Linux

http://blogs.zdnet.com/threatchaos/?p=311

Labels: