My vim default configuration

I use vim on a daily basis and I like having my default configuration on all my boxes so I know I will have the same look and feel!

Here is the content of my .vimrc file:

syntax on
set nu
set hlsearch
set incsearch
set autoindent
  1. syntax on: will display pretty colours based on the file extension
  2. set nu: activate the row numbering
  3. set hlsearch: when you search, it will highlight the patterns found
  4. set incsearch: when searching: highlight as you type
  5. set autoindent: will follow indenting when hitting return

What is yours?

Loop through the content of a folder and display the folder name and SVN URL

As part of deploying new code, I sometimes needs to know where each folder is getting its data from in SVN.

Below is a simple one-line allowing me to do so

for i in `ls -1` ; do echo -e $i `svn info $i |grep URL |gawk '{print $2}'`; done;

It will result in:

frontend http://svn.foo.lan/svn/repo/frontend/tags/FE-2.0
backend http://svn.foo.lan/svn/repo/backend/tags/BE-2.0

And then if you are lazy and wants to generate the “svn co” command:

for i in `ls -1` ; do echo -e svn co `svn info $i |grep URL |gawk '{print $2}'` $i; done;

It will result in:

svn co http://svn.foo.lan/svn/repo/frontend/tags/FE-2.0 frontend
svn co http://svn.foo.lan/svn/repo/backend/tags/BE-2.0 backend

 

And here you go :)
Happy as Larry

How to install Nokia 7m-02 dongle on Ubuntu 11.04 natty

We just got a new Nokia 7m-02 dongle, the white one, to test and I found that the installation process did not go as smoothly as expected, at least for me…

To be fair with Nokia, they are providing support for Linux which is a big plus! So thanks to them.

So how to install it:

Navigate to the folder named Ubuntu that is located here:

/media/Nokia USB Modem/Ubuntu

Then launch Setup.deb (Install64.sh if you are running a 64 bits OS), Ubuntu Software Center starts and you, simply, launch the installation and expect it to work …

Well it did not for me.

The installation bailed out, claiming I had to check my Internet connectivity … Odd to say the least. I think it would be the same feeling as buying a new car with an empty tank, you need the car to go to the petrol station…
So you would have to walk to the petrol station …
Well to be frank, I troubleshot it from the comfort of my sofa, which is not negligible!

Anyway …

Here is what I did, simple but effective!

sudo mkdir /var/lib/dpkg/updates

And that’s it.

I relaunch the installation and … I am now posting this blog using the dongle, so it works :)

Socks management

For quite some time, I struggled with having matching socks (I am this kind of person, my parents used to work in the socks business when I was a kid so I guess it has impacted me).

Mad socks

Since I got the socks on different occasion (you know the one you get in your Xmas stocking :) ) so they were all a bit different, in size, colour, shape…

And after the laundry, I ended up spending my time trying to find the matching sock… And I believe I have better use of my time doing real stuff …

I first got those with coloured end… Did not work

Then those with the day on it… I lost some …

So the simple solution: a pack of 20 pair of plain black socks. You got some strange looks as it does not seem normal to the lady behind the counter to sell 2 entire rack of socks in a go… I can’t see why…

This way, when your clothes are dry, you can chuck them all in your drawer and you know for sure that the next any 2 socks you pick will be the same!

Isn’t that beautiful (ok I may be a bit overwhelmed here )

But I guess you got the point!

How about your sock habits??

Mad socks

First comment approved on manblog!

I have just approved the very first comment on the blog ever!
To me it is very exciting to start engaging with the online community!
I hope it will continue this way and I will receive more comments and feedbacks.

Thanks to Jabba to be the very first one to have done it :)

Check it out there: Go to the comment

Gael

Testing new themes!

Hi all!

We are constantly improving the website and we are looking at the look and feel of it at the moment.
This is why the themes will change from time to time order to find the most uncluttered display to improve readability.

At the moment, we are running zbench (more info here)
zbench preview
Help us to get there faster and give us your feedback :)

Cheers

Gael

Sick – insane short film

A guerilla movie Written & directed by a frenchie : Jean Luc Herbulot
written in 1 night, cast in 1 day, shot in 2 days and 1 night in Los Angeles, No additional lights, no budget.
Guerilla movies are a type of movies done with no money, few people and low equipments.
The “Do it yourself” theory striked again.

Watch SICK

Tips: Quickly remove freshly installed packages

Sometimes you are installing a couple of software to test.
yum or apt are doing their jobs perfectly by downloading loads of other bits and pieces to solve dependencies for you. Great! this was easy.

You do your testing, realise it is not what you need and want to remove ALL the packages that have just been installed… then the nightmare starts as you need to remove the software one by one…

As this happened to me a couple of times, it is useful to get some scripts to do the heavy lifting for you, especially when you realise that you could have used a snapshot but forgot …

To automate this, here is what I did, it is based on CentOS 6:

[root@beta RHCE_training]# yum install policycoreutils-gui
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.for.me.uk
* extras: mirror.for.me.uk
* updates: mirror.for.me.uk
Setting up Install Process
Resolving Dependencies
[... skip ...]

Dependencies Resolved

================================================================================================================================================================================================================
Package Arch Version Repository Size
================================================================================================================================================================================================================
Installing:
policycoreutils-gui i686 2.0.83-19.18.el6 base 206 k
Installing for dependencies:
avahi-glib i686 0.6.25-11.el6 base 20 k
dmz-cursor-themes noarch 0.4-4.el6 base 390 k
gnome-icon-theme noarch 2.28.0-2.el6 base 3.9 M
gnome-python2-extras i686 2.25.3-20.el6 base 32 k
gnome-python2-gnome i686 2.28.0-3.el6 base 69 k
gnome-python2-gnomevfs i686 2.28.0-3.el6 base 74 k
gnome-python2-gtkhtml2 i686 2.25.3-20.el6 base 21 k
gnome-themes noarch 2.28.1-6.el6 base 3.4 M
gnome-vfs2 i686 2.24.2-6.el6 base 733 k
gtk2-engines i686 2.18.4-5.el6.centos base 275 k
gtkhtml2 i686 2.11.1-7.el6 base 166 k
hal-libs i686 0.5.14-11.el6 base 67 k
libbonobo i686 2.24.2-4.el6 base 404 k
libbonoboui i686 2.24.2-3.el6 base 322 k
libgnome i686 2.28.0-11.el6 base 500 k
libgnomeui i686 2.24.1-4.el6 base 674 k
setools-console i686 3.3.7-4.el6 base 327 k
shared-mime-info i686 0.70-4.el6 base 208 k
system-gnome-theme noarch 60.0.2-1.el6 base 11 k
system-icon-theme noarch 6.0.0-2.el6 base 112 k
usermode i686 1.102-3.el6 base 187 k
usermode-gtk i686 1.102-3.el6 base 98 k

Transaction Summary
================================================================================================================================================================================================================
Install 23 Package(s)

[...skip...]

Complete!

Copy the package list above (from the 1st package name to the latest) and paste it in a new file, such as tmp then enter the following

[root@beta RHCE_training]# sed -i -e ‘/^[I]/d’ tmp
[root@beta RHCE_training]# for i in `cat tmp | cut -d’ ‘ -f 2` ;do echo $i; yum remove -y $i; done

Some explanations:

  • The sed command will get rid of the lines starting with “I”.
  • The for command will loop through the tmp file, returns the software name and then automatically remove it.

I hope this will help you! If you know another way to perform the same for another distro for example, please share it with us in the comments :)

Nice wine that goes very well with cheese

During those days loaded with festivity, I had the chance to taste this very nice wine that went very well with cheese!

It is a Chateau Bellevue Lugagnac 2009.
You will need to decant it to make it breath a bit. Hey it’s a Bordeaux!

I won’t talk about the wine specs but I can tell you that I tried it, it was very nice and I strongly recommend it :-)

However if anyone knows more about this lovely beverage please share with us and comment on the post!

Well enjoy it, with moderation. Obviously …

20111228-221343.jpg

Update 30/12/2011: I have found some bottles for £9 online which I think is a very attractive price.

Password-less SSH authentication under CentOS6

I have just installed a fresh CentOS6 VM, and apparently there is a bug with SELinux which is preventing to use a pair of public / private key to authenticate.

http://bugs.centos.org/print_bug_page.php?bug_id=4959

If, you do not want to be bothered with SELinux (I am using a test setup), simply disable it, below is how…

[gael@alpha 17:13:31 :~]$ ssh-copy-id -i .ssh/id_dsa.pub beta.local
root@beta.local’s password:
Now try logging into the machine, with “ssh ‘beta.local’”, and check in:

~/.ssh/authorized_keys

to make sure we haven’t added extra keys that you weren’t expecting.
[gael@alpha 17:13:47 :~]$ ssh beta.local
root@beta.local’s password:
Last login: Sat Dec 24 17:10:49 2011 from 192.168.2.10
[root@beta ~]# vi /etc/selinux/config # Here I configured SELINUX=disabled
[root@beta ~]# setenforce 0
[root@beta ~]# exit
logout
Connection to beta.local closed.
[gael@alpha 17:15:45 :~]$ ssh beta.local
Last login: Sat Dec 24 17:15:06 2011 from 192.168.2.10

 

Now it is your turn to participate!
If you have any more information about this issue or have the SELinux configuration that would fix this, post it below :)