Import Export to different tablespace names with Oracle 9i

Renaming Oracle Database is a pain, coming from OpenSource DB like MySQL or PostGres where we do that all the time i did not think that Oracle have to be such a pain. My only way i can find. If i have the tablespace named tablesp1 and owned by the user user1, and i want to import it to another tablespace called tablesp2 in an another Oracle 9i tablespace with the user...

February 7, 2007

SVN Diff against changes in the remote repository.

A useful svn wrapper scripts. Get a diff of your local repostitory against the upstream repository changes. I wonder why it is not builtins though like a svn status -u but for dif. #!/bin/bash IFS=" " for line in `svn status -u`;do [[ $line != " "* ]] && continue rev=`echo $line|awk '{print $2}'` ff=`echo $line|awk '{print $3}'` svn diff -r${rev}:HEAD $ff done

February 7, 2007

Emacs nighly cvs snapshot with xft on Ubuntu Edgy

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:[email protected]:/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}....

January 21, 2007

History expansion and substitions in ZSH

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

January 11, 2007

Rename bunch of file via regexp

To rename bunch of files via regexp i was using before a homegrown python script call rename-regexp.py{#p38} 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.

January 7, 2007

Benchmarking with PGBench: TPS results.

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...

January 6, 2007

Compile tora with oracle

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.

January 4, 2007

sqlplus timeout when connnecting

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....

January 3, 2007

My first webpage

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.

December 30, 2006

Xterm like Control-L in Eshell

If you want to emulate Control-L in Eshell (the Emacs Shell) like in Xterm, you can use this : (defun eshell-show-minimum-output () (interactive) (goto-char (eshell-beginning-of-output)) (set-window-start (selected-window) (save-excursion (goto-char (point-max)) (line-beginning-position))) (eshell-end-of-output)) And add a key bind to it in your custom hook : (local-set-key "\C-l" 'eshell-show-minimum-output)</p> <p>

December 28, 2006