Posts

Using Konqueror with Gmail full featured version

Image
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

Image
(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 : http://www.versioncontrolblog.com/comparison/Bazaar/CVS/Git/Subversion/index.html 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't know B...

Convert your CVS repository to GIT

Image
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@10.0.0.99:/backups/local/files/20081006_ibay_cvs.tar.bz2 . 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

Image
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

Image
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, to find...

Setting up UPS link with an ubuntu server

Image
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 8.0.4.1) 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, you might wa...

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 screen the foll...

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="http://maps.google.com/maps?file=api&v=2&key=A...5g"> </script> A simple trick, is to request a key for a fake domain here : http://code.google.com/apis/maps/signup.html 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\system32\...

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= "http://www.springframework.org/schema/beans" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation= "http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"> <bean class=...

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.