Color schemes for Vim

| September 17th, 2008

If you’re looking for color schemes for Vim, then you’ll enjoy the following link:

http://www.cs.cmu.edu/~maverick/VimColorSchemeTest/

Some of the schemes will work only in the Vim’s graphical interface (GVim), but there are others with color configs for Vim (running on a terminal, like xterm).

If you want a scheme that will work on vim in the terminal, make sure it has cterm, ctermbg and ctermfg configs. It’s also a good idea to run vim on a 256 color terminal. Take a look on these pointers for more on this:

http://www.jukie.net/~bart/blog/20060824224842

http://blog.cynapses.org/2006/08/09/konsole-256color/

Chm2pdf, YEAH!

| September 5th, 2008

I’ve been trying to find a nice way for printing chm files in book style - no lucky!

Both Xchm and Kchmviewer are very good programs for viewing chm files in the computer, but they lack the ability to print whole documents at once (if some one knows how to do that with these apps, please drop a comment/email/whatever :D)

Then I came to know this great project - chm2pd. Just get it, install it with its dependencies (very easy, just follow the steps in the README that comes with the source code) and you’re ready to go! Convert your chm files to pdf and print them as you please.

More on this great script cand be found on:  http://www.karakas-online.de/forum/viewtopic.php?t=10275

Mount ISO file across NFS

| July 25th, 2008

I had a problem today and I’d like to share the solution :P

Imagine you have some ISO files exported on a NFS server, and then you mount the directory with this ISO files in the local computer. Something like:

# mount nfs_server:/srv/exports/isos /mnt/isos

Ok, this way you’ll have all your ISO files at /mnt/isos. Now, imagine you want to mount one of these ISOs in loopback:

# mount -o loop /mnt/isos/blah.iso /tmp/blah
/mnt/isos/blah.iso: Permission denied

OOppss.. Permission denied??? Hmmm.. I got stuck with this problem for almost 30 minutes. Tried changing permissions and exporting parameters, Google, but no answer at all… then… fortunately…. I found it:  -o loop,ro!

# mount -o loop,ro /mnt/isos/blah.iso /tmp/blah

YEAH!  It cost me 30 minutes :P

Yes, I’m a Gkrellm fan!…

…And I thought about writing a Gkrellm plugin to ge stock quotes from Bovespa (using Yahoo! API), but, before start doing that, I found gkrellstock (http://gkrellstock.sourceforge.net/).

This is a very simple frontend to the Finance-Quote Perl’s module (http://search.cpan.org/~hampton/), and saved me some time ;D

This is a summary of what I did to get my iPod (80G Video - Black) working inside KDE. Please, feel free to send comments and  questions ;)

First of all, I installed these applications:

  • DBus
  • HAL
  • Pmount
  • Amarok

And made sure KDE was compiled with HAL support, and Amarok with ipod support. As I use Gentoo, I did:

#USE=”hal ipod” emerge dbus pmount hal amarok kdebase

Then I put my user on the plugdev group (pmount mounts things using this group), and set HAL and DBus services to start upon system boot. In Gentoo we can use the rc-update tool:

#gpasswd -a trustlix plugdev
#rc-update add hald default
#rc-update add dbus default

Great! After that I started both hald and dbus, and restarted my X.

#/etc/init.d/dbus start
#/etc/init.d/hald start
#/etc/init.d/xdm restart

To make sure my KDE was working with HAL support, I went to Control Center -> Peripherals -> Storage Media -> Advanced.  The option “Enable HAL backend” must be marked.

After all these steps, I finally plugged the iPod on the USB port and started Amarok, which automatically recognized it.

Last thing I did was to click on the “Connect” button, that showed me a window asking for the mount/umount commands I’d like to use, and I put:

  • pmount %d
  • pumount %d

For both mount and umount commands, respectively.

And that was it. Hope it helps someone! :)

Recently I updated the ghostscript-gpl package and since then started to get the following error when trying to convert ps files to pdf:

Fontmap entry for Proxy has an invalid file or alias name!

I tried to remove any references for Proxy from the Fontmap file (/etc/fonts/Fontmap), but it didn’t work. After some searching I found the genfontmap.ps file, inside the ghostscript-gpl source package. This script can be used to create a new Fontmap file:

 # gs -q -sFONTPATH=/usr/local/share/fonts \
/tmp/ghostscript-8.62/toolbin/genfontmap.ps > \
/etc/fonts/Fontmap

Just thought it would be nice to share this tip :)

Seriados de tv

| April 12th, 2008

Olha o que eu descobri durante um almoço - islifecorp. Decididamente eu vou precisar repensar minha posição com relação aos rapidshares da vida… e quem sabe começar a dormir apenas 2 horas por noite.. ou menos :)

Graças ao Carlos Costa, amigo e companheiro de trabalho, cheguei no blog Som Barato - uma verdadeira vitrine para a música popular brasileira. Vale *muito*  a pena conferir.

OBS: links para os álbuns disponíveis no rapidshare (damn’t… eu não queria me associar.. MASSS…. dessa vez vai valer cada cent!)

Cirque Du Soleil - São Paulo

| March 14th, 2008

Ontem fomos assistir em São Paulo o espetáculo Alegria, do Cirque du Soleil. O que foi aquilo???

Sem palavras para descrever a beleza das fantasias, a simplicidade e eficiência dos palhaços (quanta risada geeente), e os saltos e coreografias que desafiam nosso senso de gravidade…

Respeito ao público em cada detalhe, facilidade de acesso ao local do evento, nenhum atraso - tudo perfeito para uma noite especial, e esta foi, com certeza!

Valeu cada centavo (tá.. o preço foi meio salgado… mas blz… nada é perfeito :))

One year ago I bought this beauty because of it’s good price and bunch of features, also, I was wanting a network printer, so I could plug it into my wireless router and be happy forever.

BUT, after some hard time trying to configure it in order to get a static IP address, I just gave up the battle and setup a DHCP server…It seemed impossible to get the damn printer working using a static IP. Since then, I had to keep my desktop running if I’d like to print something - bad time ever :/

This week, fortunately, I found a nice post (How To: Set a Static IP address on a Lexmark E120n) showing how to do the trick, and get the printer working as I wished since the first time.

In my case, I had just to turn off my dhcp server, then I connected via telnet to the printer on port 9000, and setup all the network stuff. Beautiful.