Wednesday, November 29, 2006

Close and manage file with vim

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

to close vim
to close vim without recording the modifications
to write the modification
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
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.
display information about vim

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

Saturday, November 11, 2006

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
  12. Email-Worm.Win32.NetSky.aa
  13. Email-Worm.Win32.NetSky.b
  14. Net-Worm.Win32.Mytob.c
  15. Trojan-Spy.HTML.Bankfraud.od
  17. Email-Worm.Win32.Warezov.gen
  18. Email-Worm.Win32.Bagle.dx
  19. Email-Worm.Win32.Warezov.dh
Some new players in the team: Warezov.dn, Warezov.ev, Warezov.dc,,, Warezov.gen, Warezov.dh.
Some malwares which begin to extinguish: NetSky.b, Mytob.c, Bankfraud.od, 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 file with your username and password for That's it, now you can run the main script:
you should see something like:
Starting LastFMProxy 1.1...
Connecting to server...
To tune in, point your browser to:
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 you need to go in Settings and that's it! You can now choose open a 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