Showing posts from 2008

Using Konqueror with Gmail full featured version

When I run on Windows XP, I've my standart gmail address opened in firefox (and 3 other google apps gmail), and a developper gmail adress (which subscribe many mailling list). Now that I'm on kubuntu (at home), I needed an extra browser to do the same, and it's obviously Konqueror... but what's sad is that it's a poor plain html interface that you get with gmail. So I switched the user agent to Firefox, but I get a blank page. I've tryed with Safari (as it uses webkit, the render engine of Konqueror) and it works...except that I need to use a wheel click to make a regular clic. Everything else work fine (except you don't have rich text editing, but maybe you don't have it on safari as well...)

Switching from CVS to Baazar Version Control System

(note : this post will be improved soon) I'm changing my server to a new machine as the existing one as capacitor leak issue on the motherboard... I switch from sme server to ubuntu server. And as I was almost finishing the migration of my cvs repository to the new server, I asked myself : and what about SVN ? and Bazaar on which I've read about on mysql developer site ? And git, the VCS used for the linux kernel made by Linus Torvald himself (GIT and the Kernel) Here is a site that help me to have an idea of the feature of each VCS : I've made a try with GIT, but due to a poor eclipse plugin which development seems to have stalled. I've chosen to try Bazaar. And here is links that answer my main concern : CVS to Bazaar migration Through SSH connection Eclipse plug-in I've also mainly choose Bazaar because I already know cvs quite well, and made some try on SVN, but didn

Convert your CVS repository to GIT

While I was on sick list, this last two week, I've search to get away from the venerable CVS and it's painful merge capabilities. (Also I was curious to try something else). Here is how I converted my CVS repository to git : Install GIT : sudo apt-get install git-core git-cvs Install cvs for the conversion : sudo apt-get install cvs cvsps Get the CVS repository backup ( a tar jcf of the cvs root dir) : mkdir ~/temp/cvs2git cd ~/temp/cvs2git scp root@ . tar jxf 20081006_ibay_cvs.tar.bz2 Launch the conversion : export CVSROOT=/home/thomas/temp/cvs2git/cvs/files git cvsimport -C /home/thomas/temp/cvs2gitOutput/crf-irp crf-irp git cvsimport -C /home/thomas/temp/cvs2gitOutput/crf-irp-model crf-irp-model git cvsimport -C /home/thomas/temp/cvs2gitOutput/crf-irp-monitor crf-irp-monitor git cvsimport -C /home/thomas/temp/cvs2gitOutput/crf-irp-portail crf-irp-portail git cvsimport -C /home/thomas

mount a NTFS partition on hardware RAID0 controller under linux

My main computer has a major hardware issue (probably the motherboard, maybe the cpu). I can't re-install windows, it crashes in the middle of the installation. To complicate things, I've installed my windows on a (fake)hardware RAID0. It's fake because the raid part is handle by the windows driver. That's why you can still see the hard drives under linux as /dev/sda /dev/sdb etc... even after having setup your RAID0/1/5 Array in the bios. As I'm not completely dumb, I've stored no critical data on the RAID array... But still, I wanted to check that fact (I'm not dumb ;) and get some non critical files, such as game save (I don't play that much recently... so sad, but it may change once Diablo III or Starcraft II is released). To get my data back, I've used a linux Distribution and use it's DMRAID capabilities. I've downloaded and burned the Gentoo Live CD . BTW, it's a really great distribution. I loved to installed it fro

What I allways install/change on my ubuntu servers

I'm installing several ubuntu servers for various purpose (home server, Secondary DNS server, new primary DNS server, web servers, development servers). For each one, I write the setup documentation (which are stored on a google apps premium account, which is by the way a must have for all the cooperative stuff). Here is what I do for all servers, no matter the final use : useful software sudo -s # switch to root account as at setup I do a lot of root stuff apt-get update # update the apt-get package list apt-get upgrade # upgrade all package that are installed by default apt-get install vim-full; # A lot of dependencies comes along, but vim is much better after (need some config modification) apt-get install sysstat; # To monitor Hard drive activities apt-get install whois; # contains the mkpasswd command apt-get install slocate; # slocate, t

Setting up UPS link with an ubuntu server

I've bought a new server (build from parts) to replace the old one that has capacitor leak issues and died † And with it, I bought a new UPS (Uninterruptible Power Supply) to replace the old one that non longer work either... I've googled internet to setup this UPS with my linux server (ubuntu server and here is the result of my search and work : When the UPS detect a power outage, it wait some times (configured depending on the capacity of the UPS and the power consumption of the server), and then send a mail with the UPS state just before the shutdown, and then shutdown the server. While waiting some time, if the power is back, the shutdown is cancelled. The UPS state is useful as it shows you the health of your UPS when it goes on battery. If the charge is really low when the server is shutdown, you might want to reduce the time it wait on battery before shutting down the server or replace the battery (or the UPS). If the charge is really close to 100, y

How to remove a windows update

here is how you should proceed to uninstall the an update : (here KB936357 ) Insert you windows XP CD (any version) in your CD Rom drive, boot, use your boot Menu or go into your bios to choose your CD Rom drive as first boot device Boot on the CD (hit enter to boot on the CD) If you're using RAID 0 or RAID 1 for your C drive Hit F6 to specify an additionnal driver when it tells you so in the bottom dark blue line wait that windows loads all it's stuff Insert your floppy disk with raid driver on it hit S choose all line marked as "Required" (by repeating the S thing many time) then hit enter to continu normal boot Hit R to repare an existing window installation Choose the windows home directory (usually c:\windows but can be different for entreprise installation or nerds PC ;) enter the windows Administrator password you get the command line, now, type the following command : cd $NtUninstall KB936357 $/spuninst batch spuninst.txt For me it print on the sc

Developping with googleMaps everywhere with the same licence id

When you want to use google maps on a website, you need to signup and get a key for the internet domain name that will use google Maps. When your developing your googleMaps feature, it's not on the production site with the final url. (At least... I hope it's not so ;) And you may code some google feature for several sites, and all these sites, you often code it on your computer with a local Apache/Php or Tomcat server. So in you html (jsp, php, asp whatever) page you'll include the following code to have access to the google maps feature. <!-- google map --> <script type="text/javascript" src=""> </script> A simple trick, is to request a key for a fake domain here : Let's say, for "http://toms-projects" Get the key, put it in your html code, and then edit your etc/hosts file. (/etc/hosts on linux, c:\windows

Spring Transaction support with JDBCTemplate and Java 1.5 Annotation

Here is quick tutorial to enable transaction in a Spring project using JdbcTemplate and Java 1.5 Annotations. I'm using Spring 2.5.2, Java 1.6. (it should work with Spring 1.2 and Java 1.5 too, considering this blog post, which also gives some usefull info for people new to transaction with Spring ) for example , as simply as this : @Transactional (propagation=Propagation.REQUIRED, rollbackFor=Exception.class) public Intervention createEmptyIntervention(int idRegulation) throws Exception { //...jdbc Code } Let's begin with the beginning, applicationContext.xml : <?xml version="1.0" encoding="UTF-8"?> <beans xmlns= "" xmlns:xsi= "" xsi:schemaLocation= ""> <bea

MySQL last_insert_id and Spring Framework JdbcTemplate

I'm using Spring Framework JdbcTemplate on a project with MySQL server as database. And I've noticed that the query "SELECT last_insert_id()" returns 0 most of the time. Using this syntax improves a bit : SELECT last_insert_id() from ` last_inserted_table ` LIMIT 1 The reason is that for each jdbc access, Spring use a connection for it's connection pool. So it may use one connection from its pool, to make the insert, and another connection for the last_insert_id query. The problem is that the last_insert_id query is tied to the connection that actually made the insert. In order to force Spring JdbcTemplate to use the same connection all along a portion of code is to start a Transaction before the insert, and commit it after the last_insert_id query. See this post for simply managing transaction. You might say "I always use transaction"... well, in my case, transaction were not needed until this last_insert_id issue that returned 0.

Open ssh connection through proxy with NTML authentication

Here is the explanation of how to pass a ssh connection through a proxy that use NTLM authentication protocol (cryptographic authentication) instead of a plain login/password authenication. First follow the steps describes here : Next we have to deal with NTLM authentication. Putty do not know how to talk with proxy that use NTML authentication, so we need a soft that will handle the authentication and encapsulate the network packet. To do that we'll use cntlm which is a port of an unix programms using cygwin (no need to make a insall of cygwin though...). Once you unzip the files, edit the configuration file cntlm.ini You have to change 4 values : login: Your Windows login name domain: Your domain name You can get theses information by hitting CTRL+ALT+SUPPR, a window display and in the first fieldset you can see something like "Thomas Manson has opened a session as DOMAIN\LOGIN" proxy u

How I setup GoogleApps Premium on an existing domain

Mail administration is boring and time consuming... It continuously takes more importance in every days exchange and the loss of one mail can have huge consequence : What ! You didn't bought the bread ! I sent a mail so you don't forget... it's enough... I divorce ! :op Nowdays, email takes a huge amount of space, that you need to backup... So we decided to migrate our client to google Apps : 7 servers to handle your mail, 25Go of space, a simple and very powerfull web interface with the ability to still use imap. You'll find here how I set-up Google Apps Premium for the domain You should plan this operation at the beginning of the weekend to minimize any potential issue. First I get there : I click on "Inscription" on the Premier Edition. Then I give the domain name : Then I fill the form As it's for a company, I set the VTA reference of the company to avoid to pay VT

Add image in the blogger link list

I wanted to add link on my blog to blogs I read regularly. Ok, I've found the Link List module, I add it. Add few link I like... But, some of the blogs are in French other in English... So I've obviously tried to insert some <img> or even <span>... nothing works... So I used the hard way : I've modified my template to add prototype + <head> ... <script src='' type='text/javascript'> </script> <script src='' type='text/javascript'> </script> <script src='' type='text/javascript'> </script> </head> I used the text inside the <a> as a prototype template . For example : #{fr} Rank My Day | Référencement And wrote this code to change #{fr} into a nice flag (with many thanks to for his works

Full Screen Editor for thanks to Greasemonkey

The blogger editor to write a new post on your blog is damn small... and on my 24" screen, it's even more sad... all this space wasted... I know Greasemonkey for a while and I search scripts that would increase the editor size (if I hadn't found it, I would have wirtten it!) And i've found one that works perfectly well here : by You don't know Greasemonkey yet... ? It's a must-have ! In short, it's a firefox plugin that allows you to inject custom javascript files into any web page to add some functionnality. more info here: Get firefox : Get Greasemonkey plugin : Get the Blogger Script : (click on "install this script" on the upper right corner) Get more scripts here : Other use

Open a SSH connection through an http proxy and dig tunnels :)

I'm working for an IT Services & Software Engineering company, and I often work for some time (3 months to a year) by the client company's office... And often, I'm behind a ****ing proxy that filters http request, provide antivirus analysis etc.. Useful for the company securtity and efficiency, but really borring for me. Those proxy allows http (tcp/80) and https (tcp/443) connections and nothing else... So no tcp/22 for SSH, and I miss it really much for many reasons. So here is what to do, to get an SSH connexion to a linux box. But beware that doing that will certainly break the security contract you signed when you enter the company. Doing that allow you to bypass the content filtering and security. And you could be fired for that... This blog post will show you how to bypass an http proxy with a basic authentication. The following post will show you a way to bypass a proxy with NTLM authentication mecanism. Server configuration You're a geek like me,