Error loading native library: libnjni9.so

If you like me when running oracle on x86_64 get that damn :

Error loading native library: libnjni9.so

when launching dbca and you have googled the thousands five hundred useless answer. Just add the path of the libs $ORACLE_HOME/lib and $ORACLE_HOME/lib32 to your /etc/ld.so.conf (or /etc/ld.so.conf.d/oracle.conf on RH derivative) and rerun ldconfig.

If this is during install just jump to a console after you add this line before it launching dbca and run a ldconfig -v as root.

Damn oracle….

How to get bright LS colors on Redhat with dark background

Something that i haven’t find via goole. By default on RedHat (and derivatives) if you get a dark background the colored ls will be seen really humm bold from a xterm (since i guess there default gnome-terminal has been configured to have a white background ).

The solution is to

cp /etc/DIR_COLORS /etc/DIR_COLORS.xterm

or to redefine your dircolors to get the /etc/DIR_COLORS files instead of /etc/DIR_COLORS.xterm in your shell init configuration.

Back in Sydney

It has been since 2 weeks I came back from my sister wedding. It has been a really good holiday as well under the sun. Spending a day in Dubai and 2 days in Bangkok was cool as well.

The come back is much harder thought. I did not feel the Jet but I think the change of the temperature made me weaker in my body. Hopefully sun is coming in Australia soon (still sunny theses day thought) and the beautiful days will be back.

On another good news, Noah and Marie are coming 15 of September and going to spend 1 month and half here.

Here you can watch the pictures of the wedding :

and some picture of that travel :

From Australia to Jerusalem via Jordan

I have finally arrived to Jerusalem after 30 hours of travel going via Jordan.
It has been a long and tirering Journey here is some highlight of it :

  • In the plane i meet a dude which i am playing soccer with every Sunday. It’s pretty amazing to make some meeting like that, how many chances there is that
    i meet this person in the same plane as me. The other funny thing is, that is going to be the same time as me in Dubai.
  • In Dubai i meet a french girl from the 16e arrondisement in Paris. Never seen a posh girl coming from this area of paris traveling by herself. Pretty nice person
    thought.
  • I was late for my plane in Dubai so i had the speaker calling me at the airport in loud with my names. And i was trying to don’t make myself remarked.
  • Watching Fashion TV on the plane with catwalk of arabic girls is pretty awesome, never seen arabic gilrs from that humm angle.
  • When arrived at Amman Airport i was thinking that having the names Chmouel and Reouven was going to be trouble. But in fact it was pretty straightforward.
  • Since i went straight to the south of Jordan i had to take the bus, firstable i lost myself trying to find the bus station. I finally arrived after walking all over the city
    with my backpack under the sun. Funny thing i had to wait under the sun for 3hours until the next bus was coming for Aqaba. After that i slept all over the
    bus ride.
  • Decided to go straight from Aqaba to the border. Nothing special here except that i spent some good 20minutes trying to figure out where i need to get
    my passport stamped.
    Walking between the Jordanian and Israeli border is weird its a huge alley with big electric fence all over.
  • Arrived to Eilat it was too late to take a bus to Jerusalem. So i went to the taba hostel, same hostel i stayed 2 years ago. Could not sleep because
    of the jetlag so i went having a beer with an American and Israel guys. There is a lot of teenagers around here, and they all dressing like going to a
    New York nightclub on a Saturday night. I find weird as well some young girls of 16/18 having a boob-job.
  • No sleeping at all that night and took the bus at 7 to Jerusalem, slept all over the bus ride.
  • Finally here with all my sisters brother and parents, it’s pretty cool to be with everybody since it has been a long since we did not see each others.

Cheetah Mode for Emacs

Here is a simple html derived mode for Cheetah templates files. The font-locking regexp can be improved thought but that’s a start.

(define-derived-mode cheetah-mode html-mode "Cheetah"
  (make-face 'cheetah-variable-face)
  (font-lock-add-keywords
   nil
   '(
     ("\\(#\\(from\\|else\\|include\\|set\\|import\\|for\\|if\\|end\\)+\\)\\>" 1 font-lock-type-face)
     ("\\(#\\(from\\|for\\|end\\)\\).*\\<\\(for\\|import\\|if\\|in\\)\\>" 3 font-lock-type-face)
     ("\\(\\$\\(?:\\sw\\|}\\|{\\|\\s_\\)+\\)" 1 font-lock-variable-name-face))
   )
  (font-lock-mode 1)
  )
(setq auto-mode-alist (cons '( "\\.tmpl\\'" . cheetah-mode ) auto-mode-alist ))

Access Gajim within Emacs

Here is some function to launch a gajim window from Emacs :

(defvar gajim-remote "/usr/bin/gajim-remote")
(defvar gajim-user-list ())

(defun my-gajim-get-list()
  (save-excursion
    (with-temp-buffer
      (call-process gajim-remote nil t nil "list_contacts")
      (goto-char (point-min))
      (while (re-search-forward "^jid[ ]*:[ ]*\\(.*\\)$" (point-max) t )
        (setq gajim-user-list (append gajim-user-list (list (match-string-no-properties 1)))))))
  gajim-user-list)

(defun my-gajim-talk()
  (interactive)
  (let* ((ff (if (not gajim-user-list)(my-gajim-get-list) gajim-user-list))
         (answer (completing-read "Jabber: " (mapcar (lambda (tt)(list tt)) ff))))
    (message answer)
    (start-process "*GAJIM*" nil gajim-remote "open_chat" answer)
    )
  )
(global-set-key '[(control x)(j)] 'my-gajim-talk)

If Emacs had a dbus support that would have been cool.

Assignement in Python with list.extend()

This is weird for me :

d = ['foo', 'bar', 'ba', 'c']
print d
f = d
f.extend(d)
print d

give me the result

-*- mode: compilation; default-directory: “/tmp/” -*-
Compilation started at Mon Jul 31 16:49:41

python “/tmp/a.py”
[‘foo’, ‘bar’, ‘ba’, ‘c’]
[‘foo’, ‘bar’, ‘ba’, ‘c’, ‘foo’, ‘bar’, ‘ba’, ‘c’]

Compilation finished at Mon Jul 31 16:49:4

It seems that extend assign as well the non extended part (d) which is confusing because to merge list i need to use temporary variable.

crypt(3) on unix maximal length

When i have a password comparaison function using crypt(3) i really should remember that the comparaison stop at the 7 bytes, because that stuff is weird for me :

In [1]: import crypt
In [2]: seed=’foo!bar’
In [3]: crypt.crypt(‘abcdefghaa123456681’, seed)
Out[3]: ‘foEoVhbk7ad7A’
In [4]: crypt.crypt(‘abcdefghpax;lalx;al’, seed)
Out[4]: ‘foEoVhbk7ad7A’
In [5]:

any stuff after the 6 char will always get ignored by the hash algorithm.

chmouel.com is moved.

I have finally changed chmouel.com over a new provider. The new
provider is called WebHost and i got a VPS with 50GB of
bandwith and 2GB of storage for 10US$ a month.

My first task was to compile python2.4 on that box which look like
it’s based on RH7.3 with heavy customization. Hopefully python really can compile everywhere.

I would like to thanks Vincent Danen for all his free hosting
during all theses years. He has been answering me every
questions i had and provided me a nice hosting for all theses years i was in travel.
I hope to pass by Alberta one day and invite him for the couples
of hundred beers that i own him now.

So now that i have a private server what can i do with that ? not too
much since webdev is not my hobbies (i have to do that at work and i
find it a pain in the a***), but well it’s cool to have a ssh
from everywhere in the world.