Wednesday, November 29, 2006

Close and manage file with vim

Let's continue with the best practice of the vim software:

:q
to close vim
:q!
to close vim without recording the modifications
:w
to write the modification
:w [NEW_FILE]
to write the file you are editing in NEW_FILE
:w! [FILE]
it is the same action as before but you force the action
:n,mw [FILE]
save the lines from n to m in the file FILE
:n,mw >>[FILE]
add the lines from n to m at the end of the file FILE
:wq ou :x ou ZZ
Save the file and close vim
:e!
edit the file again but with the version on the disk
:e [FILE]
edit the file FILE rather than the current file (:e! to force the action)
:r [FILE]
insert the file FILE after the current line
:rn [FILE] ou :nr [FILE]
insert the file FILE after the line n
n is either a number, or . for the current line, or $ for the last line.
:version
display information about vim

it should be enough today to play a little and increase your productivity lol ;-)


Brothers in court "for making pet dog obese"

At first glance, you could think that if Derek and David Denton go to a court for their dog, it is because of some Fast Food for dog, like a Royal McDo... Not at all they are guilty to have feed their dog too much...


I am waiting now the first trial of parents, who let their child becoming obese...


Tags: ,

Tuesday, November 28, 2006

A search engine dedicated to Security

I have played a little with the Google's technology to develop a search engine dedicated to the Security (of Internet, Computer, Networks...)
The search engine can be found at this adress:

http://cosearch.googlepages.com/cosecurity.html

For the moment only those urls are recorded for researches:
http://www.sans.org

http://secunia.com/
http://www.securityfocus.com/
http://edition.cnn.com/2006/LAW/11/20/internet.libel.ap/index.html(Court OKs broad Web libel immunity)
http://edition.cnn.com/2006/LAW/11/20/internet.libel.ap/index.html(Hackers plant virus on Website of China's largest bankcard operator)
http://www.guardian.co.uk/frontpage/story/0,,1953213,00.html(GPs revolt over patient files privacy)
http://www.cylab.cmu.edu/(Carnegie Mellon CyLab)
http://news.netcraft.com/ (Netcraft)

In fact I use it at my office, but it seems that it is not yet enough mature for the moment only : there are not enough urls in its database... So if some people want to take part to the adventure or post some interesting url...



Sunday, November 19, 2006

How to launch Vim

We have to begin with the beginning: it is not easy to use Vim at 100%, but as soon as you will you can win a huge amount of time ;-)

To open a file:
vim myfile
To have a list of all the file you can recover:
vim -r
To recover a file after a crash:
vim -r to find recovery files available (they end with .swp)
Then, when you find it, type
vim -r .pass.txt.swp
if you want to open a file at the line N for example: just type:
vim +N myfile
to open it and go directly to the end of the file:
vim + myfile
To open file at the first line containing some regular expression regexp
vim +/regexp myfile
Enough for this post...

Vim

In my office, because we are in a Windows environment for our laptop/destop, but because all our server run Linux/Unix, I have to program in command line and as consequence I use Vim... If you want to know what is vim go to wikipedia, if you don't want to change the page (;-) good girl or good boy or good alien) : here is the Vim's introduction directly from Wikipedia:
Vim, which stands for Vi IMproved, is an open source, multiplatform text editor extended from vi. It was first released by Bram Moolenaar in 1991. Since then, numerous features have been added to Vim, many of which are helpful in editing program source code. Vim is today one of the two most popular editors for programmers and users of Unix-like operating systems, alongside Emacs.
Vim is a very powerful editor... as soon as you know how to use it! Son in the next day I will try to give you the main command and explain to you how to use it at 100%.

Friday, November 17, 2006

A McDonald's game?

I have already talked about Fast Food Nation and the way the Fast Food business makes huges profits by jeopardizing the health of american citizens... Why not try to see what is the problem with MacDonald by becoming Ronald McDonald? You will understand why trying too much money too quickly prevent you to verify the health of cows... and the consequences of that...

Wednesday, November 15, 2006

What is air guitar?

Have you ever done as you are playing guitar? Have you ever dreamed to be a Clapton? Probably but what you probably don't know is that you were playing air guitar: if you think you are better as people in the video you should thing to take part to the annual Air Guitar Championship or let me message on this blog so you could create an air band ;-)



Tuesday, November 14, 2006

Paris-London = 2H

soon... Next year in fact... It will take 20 minutes less to go from Paris to London. Have you ever noticed that the Eurostar is always slower in England than in France: it is because the railway is not suitable to the TGV: so they will move from Waterloo Station to St Pancras station in the north of London near Regent's Park. Isn'it paradoxical that to earn 20 minutes the train will have to drive farer? The Eurostar station will move on the 13/14th November 2007 night... I think it is mainly for the Olympics Games and for the potential earning due to London 2012. Anyway it is a very good news for all the travelers like me ;-)


Saturday, November 11, 2006

Adsens is down

AdSense est indisponible, phénomène assez rare chez Google pour être noté.

Kapersky and the 20 viruses

Kaspersky has just published its list of the top 20 malwaress (Virus/Trojan/Worm/...) spreaded by mail. As a consequence, in the case you see those little creature: don't click on them, don't try to play with them...
  1. Email-Worm.Win32.NetSky.q
  2. Email-Worm.Win32.Warezov.dn
  3. Email-Worm.Win32.Bagle.gen
  4. Email-Worm.Win32.Scano.gen
  5. Email-Worm.Win32.Warezov.ev
  6. Email-Worm.Win32.Bagle.mail
  7. Email-Worm.Win32.Warezov.dc
  8. Email-Worm.Win32.Mydoom.l
  9. Email-Worm.Win32.Mydoom.m
  10. Email-Worm.Win32.Scano.e
  11. Email-Worm.Win32.Warezov.do
  12. Email-Worm.Win32.NetSky.aa
  13. Email-Worm.Win32.NetSky.b
  14. Net-Worm.Win32.Mytob.c
  15. Trojan-Spy.HTML.Bankfraud.od
  16. Email-Worm.Win32.Warezov.eu
  17. Email-Worm.Win32.Warezov.gen
  18. Email-Worm.Win32.Bagle.dx
  19. Email-Worm.Win32.Warezov.dh
  20. Email-Worm.Win32.Scano.aq
Some new players in the team: Warezov.dn, Warezov.ev, Warezov.dc, Warezov.do, Warezov.eu, Warezov.gen, Warezov.dh.
Some malwares which begin to extinguish: NetSky.b, Mytob.c, Bankfraud.od, Scano.aq. Unfortunately we can notice the return of: NetSky.q, Bagle.gen, Bagle.mail, Mydoom.l, Mydoom.m, Scano.e, NetSky.aa, Bagle.dx, this means that some people don't have an uptodate antivirus, as a consequence they are infected and spread the threat! So install an antivirus if you haven't one already and ensure that it is uptodate (not only Kapersky, but Norton too, or ClamWin...)

Friday, November 03, 2006

LastFMproxy, Streamripper and Amarok

I have recently discovered Lastfm, the community radio. It is a great thing just give it the name of some artists you like and it will gather musics of this artists or similar artists... After that you can be a little more specific and say if you like the music or if you want to ban it! Most of the time the choices are excellent and they are becoming more and more relevant with the time and your selection. If you want to read the lastfm flux in one of your old player on linux, you should try lastfmproxy (you can find it here ), just uncompress the archive with this command:
tar -xvzf lastfmproxy-1.1.tar.gz
then go inside the directory you have just created, modify the config.py file with your username and password for Last.fm. That's it, now you can run the main script:
python main.py
you should see something like:
Starting LastFMProxy 1.1...
Connecting to last.fm server...
To tune in, point your browser to:
http://localhost:1881/
The last line stand to give you the url you can listen in your old player... So start it and open this url. That's working ;-) Great.
In all the previous part I said "old player", it is because with the great player of linux: Amarok, you can directly play Last.fm: you need to go in Settings and that's it! You can now choose open a Last.fm flux! Enjoy.
You probably wonder why I told you about LastFmproxy if you don't need it to play LastFM if you use Amarok... It is because there is a little trick: if you listen LastFM, you only listen it, when you shut down your computer, or when the music is finished, there is no way to listen it again! So let install streamripper to record all this music on your computer. First of all you should only record music with a copy left, otherwise you are out of law! Now start lastfmproxy as explained before. And type this little command:
streamripper http://localhost:1881/lastfm.mp3 -d /home/mynqme/mydirectory -r
you can notice 3 arguments:
the radio you want to listen and record
the directory in which you will save music
the last argument will let you listen the music you are recording.
Launch the command, go to Amarok and open the url http://localhost:8000
That's it you can listen and record music on LastFM