OpenSource Jokes

January 21st, 2007

Funny website that you should checkout :

http://opensourcejokes.com/

i wish theses guys were not putting some stupids google ads on the site. But well i know them it’s a day to day full time job to be the funny guys of the place ;)

Misc

Emacs nighly cvs snapshot with xft on Ubuntu Edgy

January 21st, 2007

I wanted to try the latest cvs snapshot with XFT support, since i did not want to screw up more my workstation i have used packages instead of make install blindy.

Basically i have a script called ./build.sh

#!/bin/bash
set -e
 
d=$(date '+%Y%m%d')
debpatch=20061218-1
 
mkdir -p cvs
 
pushd cvs >/dev/null && {
cvs -Q -z3 -d:pserver:anonymous@cvs.savannah.gnu.org:/sources/emacs co -r emacs-unicode-2 emacs
} && popd >/dev/null
 
mkdir -p build
[[ -d build/emacs-${d} ]] && rm -rf build/emacs-${d}
cp -al cvs/emacs build/emacs-${d}
 
zcat patches/emacs-snapshot_${debpatch}.diff.gz|patch -p1 -d build/emacs-${d}
cat patches/with-font.patch|patch --silent -p1 -d build/emacs-${d}
 
pushd build/emacs-${d} >/dev/null && {
    chmod +x debian/rules
    dch -v "1:${d}-1" "New snapshot."
    dch "Build with xft."
    fakeroot dpkg-buildpackage -b
} && popd >/dev/null

in patches/with-font.patch i have :

--- c/debian/rules.chmou        2007-01-21 23:21:09.486353750 +1100
+++ c/debian/rules      2007-01-21 23:21:13.914630500 +1100
@@ -393,7 +393,7 @@
 # Emacs-gtk confflags
 emacs_gtk_confflags := ${confflags}
 emacs_gtk_confflags += --with-x=yes
-emacs_gtk_confflags += --with-x-toolkit=gtk
+emacs_gtk_confflags += --with-x-toolkit=gtk  --enable-font-backend --with-xft
 
 # Emacs-nox confflags
 emacs_nox_confflags := ${confflags}
--- c/src/emacs.c.chmou 2007-01-21 23:21:09.486353750 +1100
+++ c/src/emacs.c       2007-01-21 23:22:18.430662500 +1100
@@ -1408,10 +1408,10 @@
     = argmatch (argv, argc, "-nl", "--no-loadup", 6, NULL, &skip_args);
 
 #ifdef USE_FONT_BACKEND
-  enable_font_backend = 0;
-  if (argmatch (argv, argc, "-enable-font-backend", "--enable-font-backend",
-               4, NULL, &skip_args))
     enable_font_backend = 1;
+  if (argmatch (argv, argc, "-disable-font-backend", "--disable-font-backend",
+               4, NULL, &skip_args))
+    enable_font_backend = 0;
 #endif /* USE_FONT_BACKEND */
 
 #ifdef HAVE_X_WINDOWS
@@ -1816,7 +1816,7 @@
   { "-unibyte", "--unibyte", 81, 0 },
   { "-no-multibyte", "--no-multibyte", 80, 0 },
   { "-nl", "--no-loadup", 70, 0 },
-  { "-enable-font-backend", "--enable-font-backend", 65, 0 },
+  { "-disable-font-backend", "--disable-font-backend", 65, 0 },
   /* -d must come last before the options handled in startup.el.  */
   { "-d", "--display", 60, 1 },
   { "-display", 0, 60, 1 },

i have as well in patches/ the ubuntu (or could be debian) patch downloaded from the ubuntu (or debian archive) archive which is for ubuntu on

http://archive.ubuntu.com/ubuntu/pool/universe/e/emacs-wiki

If there is a new version you will need to increase the version in build.sh to match the patch downloaded.

When running build.sh it should produce binary in build/* with xft enabled by default. Make sure to have all the dependencies (dpkg-buildpackages should tell you if there is unresovled one).

One screenshot :

Screenshot of Emacs snapshot with XFT

Emacs

History expansion and substitions in ZSH

January 10th, 2007

I better to keep that somewhere since i always forget that thing, to do a search and replace from the command line in zsh. you just have to do the :s^FOO^BAR after your expansion

For example you just have typed the long command line :

blah bar FOO=1 FOO=3 FOO=6 cnt=1

you can just type :

!blah:s^FOO^VALUE^:G

and it will be expanded to :

blah bar VALUE=1 VALUE=3 VALUE=6 cnt=1

Scripts

Noah latest update

January 8th, 2007

Litle one is growing and soon one year old

Noah dans les bareauxNoah latest

Noah

Rename bunch of file via regexp

January 6th, 2007

To rename bunch of files via regexp i was using before a homegrown python script call rename-regexp.py to change bunch of files with a regexp.

But since then i discovered wdired which is pretty fantastic to use that from emacs. With the extended “query-replace-regexp“ from Emacs22 stuff are much easier to rename.

Emacs

Benchmarking with PGBench: TPS results.

January 6th, 2007

pgbench is not the best tools to benchmark postgres but it’s
the one shipped by default with postgres.
It does not do a good job for benchmarking your “web apps” SQL wise, it will give you some
good indication about how fast is your server for postgres.

Here are some results we have collected using theses options :

pgbench -Uuser  -s 10 -c 10 -t 3000 benchmark

We configure servers with RAID 1+0 with write-cache and a battery
backup, we have tested with postgres 8.1.5 and here are the best
results for different type of servers :

IBM x3650 : 729tps
HP DL385 : 717tps
Dell PowerEdge 2950: 708tps

postgres

Compile tora with oracle

January 4th, 2007

After installing Oracle instant client, if you have them in /usr/local/lib/instantclient_10_2, this is the command line i use :

./configure –with-instant-client=/usr/local/lib/instantclient_10_2 –with-oracle-includes=/usr/local/lib/instantclient_10_2/sdk/include –with-oracle-libraries=/usr/local/lib/instantclient_10_2 –with-oci-version=10G

Let me know ny email if you want the deb for ubuntu linux.

Oracle

sqlplus timeout when connnecting

January 2nd, 2007

If you are using a pam_ldap or pam_nis environement and it happend that sqlplus does not want to connect as user but it does as root, waiting for :

socket(PF_FILE, SOCK_STREAM, 0)         = 3
connect(3, {sa_family=AF_FILE, path="/var/run/.nscd_socket"}, 110) =
-1 ENOENT (No such file or directory)
close(3)                                = 0
open("/etc/hosts", O_RDONLY)            = 3
fcntl64(3, F_GETFD)                     = 0
fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=286, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE
|MAP_ANONYMOUS, -1, 0) = 0x45b78000
read(3, "127.0.0.1tlocalhost.localdomaint"..., 4096) = 286
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0x45b78000, 4096)                = 0
getpid()                                = 26002
getuid32()                              = 1121
futex(0x41239198, FUTEX_WAIT, 2, NULL 

You just to have make sure to have nscd up and running. dunno what sqlplus does :(

Oracle

My first webpage

December 30th, 2006

Classic my first webpage is still on the web that was back in 98 and that was about Emacs :)

http://membres.lycos.fr/crblinux/html/xemacs.html

It is in french thought.

Emacs

I am a user of the Bagdhad Musem Wiki

December 30th, 2006

Ah i just discovered that the Bagdhad Musem have fetched my wikipedia page and i am on it now :

http://www.baghdadmuseum.org/ref/?title=User:Chmouel

I feel greatly honored (yeah whatever).

Misc