Monthly Archives: May 2007

vim windows and tabs

Tabs are great, I don't know what I would do without tabs, they are everywhere, your browser has them, your editor has them, even your webmail has them ( see yahoo mail ). Well I just discovered vim has them too.

Before windows and tabs

I don't know why I never thought of this before. I was always opening each file in it's own vim session, but that's hard to work with, you can't copy/paste from one file to another using vim commands ( my, y`y, P ) , I used the mouse for that ( not the best choice ). And to switch from one session to another I had to always do CTRL-Z ( to put current session in background ) then fg x to put another session in foreground. That was until I discovered screen split.

Multiple windows

With vim you can split the screen vertically or horizontally and open a different, same or new file in each screen.

Pplit the screen horizontally - :sp filename or :new [filename]

Split the screen vertically - :vsp filename or :vne[w] [filename]

If you use :sp/:vsp with no filename specified then the current screen will be split in half and it's content copied to both screens.

If you use :new/:vne with no filename then it will just create a new empty window.

Move to the next with : CTRL-W j or CTRL-W <down arrow>

Move to the previous window with: CTRL-W k or CTRL-W <up arrow>

You can also jump more then one window by using a number after CTRL-W. For example CTRL-W 3 j will take you to the third window from your current position.

This was great for visually comparing sections of files or to do copy/paste , but you're limited by the screen size. If you split your screen in 10 you're not going to see much from any file.

The Tabs

To open a new tab :tabnew [filename]

You can move between tabs with CTRL-PageDown and CTRL-PageUp or type a number before CTRL-PageDown or CTRL-PageUp and you'll jump that number of pages.

You want to close all tabs except the current tab? :tabo

Close current tab - :tabc

Close n'th tab: :tabc n

There are a few other commands for working with tabs but it's likely you'll never remember all of them so I'm not going to write about them. there's always vim built in documentation for that.

Never underestimate the power of vim!

Do you know good vim tips and tricks ? Care to share in the comments?

google apps: check mail

I went to google apps today and here is what I see on their page:

 With Google Apps, you and your colleagues can check email, schedule meetings, check email, chat in real time,....

So you can check email, schedule meetings, check email, chat, check email, share calendars, check email....hmm if that's how you're going to work I'm not sure how productive you're going to be with google apps. But yes I guess we are all addictive ( to some degree ) to checking our email and stats ... uhh they forgot to mention that, "check stats" - analytics, adsense, adwords, webmaster tools a lot of stats to check...gotta  go!  Have work to do. I haven't checked my email and stats in a long time.

de-mono-ification

Today I removed mono completely from my gentoo system. I'm not sure how it got there, but gnome seems to use it the ebuilds in gentoo seem to have it activated by default. Well I don't need that, and it drew my attention on it when I did an update and it didn't want to compile. Well I had a pretty good solution for that. :)

It's sad that the gnome developers ( some of them working for novel ? ) chose mono for who knows what stuff they wanted to do. It's hard for me to understand this. When you have so many free-not -microsoft-.net-clones out there and when you already have your project written in C+, why in the world start to write pieces of gnome in mono. Yeah so Microsoft claims Linux infringes it's patents well let's make them right :) , let's clone their main programming language that they love so much. Oh wait we're safe now that novel has made a deal with them.

The future is not so bright for gnome, I'm not sure I'm going to use it much longer. Gotta start searching ... What are your preferences in desktop managers ?

the ubuntu buzz

there seems to be quite a buzz about ubuntu these days,. Digg and other similar sites are full of stories about "the perfect ubuntu setup", "the perfect ubuntu server" and others like that.

Well maybe not today cause now we have bigger problems.

We're shocked by engadget's / apple , iphone delay anouncement :) , even though they also announced it was a mistake, basically fake news, apple fanboys seem to be still affected by it.

Another "big" problem seems to be with the Microsoft announcement that linux code infringes their patents ( come on ... you want more then novel and dell ? is red-hat the last one ? ) I think they also tried this back 2004 but this time they specified the exact number that each subsystem infringes ( kernel, email , gui ... ) so we're back at the old "linux contains code patented by microsoft FUD" but after this we sould see some more ubuntu stories.

Oh yes ubuntu is so hot, especially now that dell will ship desktops preinstalled with ubuntu.

I was never eager to try ubuntu, I don't know why but the whole "linux for human beings" didn't catch me. I guess I never knew linux was not for human beings before ubuntu.

Anyway few days ago I did my first ubuntu install. Can you believe that ? my first. and guess what ? I installed it on a brand new dell inspiron 1501 that had freedos pre installed.

First impression: ubuntu is not bad at all. But I didn't really get the chance to use it for more then one hour cause it was not my computer. My wife's friend just bought her computer and she wanted windows there but ended up with ubuntu :) .

Good experiment, overall she liked it and still using it.

Stop playing with page titles

This is more like a reminder to me then an advice for others to follow. It reminds me that I should stop playing with page titles and get them right from the beginning.

WordPress default post titles

When I first started this blog using wordpress the default template had something like "Patchlog ›› Blog Archive ›› Post name" for the post titles.

That's really not good for search engines. Having that "Patchlog ›› Blog Archive" in front of every post title is looking like all posts have the same title to a search engine because they only consider a small number of characters from the title when they index your pages, and because the part that makes them different is in the end it may not be considered or may not show up in results.

The first change and the imediat result
By the time I finally decided to change this, google had already indexed all my pages with the wrong titles. After I changed it google started to re-index everything because it thought that everything changed ( see how important the page title is ? :) )

That was all fine but because it started to re-index my posts were not showing anymore in google results for relevant keywords until it finished the re-index.So during that time the traffic decreased till my posts were back in it's database with the new titles.

The second change

The only problem is that I did not get the page titles right so I had to change them again after the site was already re-indexed and I'm back in the dark on google.

Take for example my post about making squid 2.6 transparent proxy to work if you are used to squid 2.5 config. That post got more then 400 visits from people searching for squid 2.6 transparent or phrases containing squid 2.6 or transparent or proxy last month. This month got around 100 and I think that was in the beginning of the month before I did the second round of changes to my page titles because I did not notice any increase on those numbers in the last week.

So if you want to change something as important as your page / post titles and you know it will affect all the pages on your site, think twice before applying the changes to make sure you get it right the first time.

making money online

This is a little out of topic on my blog, but lately I've been reading a few blogs about internet marketing, seo, web site monetization methods and other topics related to making money online.

John Chow is one of those bloggers making big money from their online blog and web sites. I read his blog to find out about the latest techniques and trends.

He writes on his blog John Chow dot Com about how he makes money from his ad network and his tech site thetechzone.com and gives tips and suggestions about how to increase your blog traffic and popularity. He basically shares his experience, telling you what worked for him, and what may work for you.

He gives advices about how to make money online  and how to  write on your blog but he also writes about cars, technology and dining so you'll get quite a lot of topics on his blog.

John Chow dot Com is blog that helps you make money online. If you do a review of his blog, he’ll link to you so his readers can check you out.

Color Picker

AdesClrPicker is an easy to use standalone program that let's you designers out there easily get the code for colors anywhere on your desktop.

Of course it you're using firefox there's an extension out there that does the same thing but that will only let you pick colors from your browser and Ades Color Picker has some useful extra features built in.

AdesClrPicker has a color library that let's you manager the captured color codes, you can delete andadesclrpicker  menu edit colors ( set up the RGB values ), you can save the codes in a text file different formats ready to be used in HTML, Delphi, C++ and VB.

When started, this program goes to system tray and waits for activation.A right click on it's icon in system tray will show a popup menu with several options (Activate, color Library, Settings, etc ) and a list or recently captured colors.

You can activate it from that menu or with a key combination that you can customize from settings.

ades color picker magnifierWhen active the color picker will attach a magnifier to your mouse cursor so that you can easily pick the color you really want.

Flexible and easy to use, no need for photoshop loaded just for picking colors, not that I use photoshop, gimp rocks :) at least for my image processing needs.
And btw this color picker almost works in Linux if you have wine. I say almost because you can start it but it will only pick colors that are inside it's own window, but this is because of a problem with wine applications not being well integrated into the X window manager. Maybe a future version will have Linux/Unix support too.

Here are some screen shots of the color picker in action:

ades color picker screen shotades color picker screen shot 2

What color picker and design tools do you use for web/software development? I would love to hear about them in the comments.

stop spam in phpbb with akismet

Spam is a big problem these days. Spammers use advanced bots that can post thousand of spam messages on your forum, your blog, or any other type of site that allows the user to post messages or comments. The bots are becoming more and more advanced.

A few years ago it was easy to stop this type of spam using methods like CAPTCHA but now the bots have sophisticated ocr algorithms that can easily detect the obfuscated characters in an image so that's not a protection anymore.

If you run a forum with phpbb you will have to install a few mods to protect it against spammers. If you don't do anything you will get hundreds or thousands of spam messages a day, you'll want to bang your head on to the wall trying to keep up and delete the messages and your forum users will most probably leave your forum before you'll manage to get rid of all that spam.

Continue reading

Full Feeds

I just enabled full text feeds on this blog so now you can subscribe to my feeds and read full articles from  the comfort of your feed reader :) .

I'm using the <!--more--> tag on some articles and because wordpress 2.1 also splits the feeds when it finds the more tag I had to install the Full Text Feeds plugin created by Ronald Heft.

There are some other methods to do this presented by Kevin Muldon on his How to use the more tag and display the full content in your RSS Feed  post.

Free dual monitor video card

John Chow if giving away an ATi Radeon-based X1550 graphics card.

This card has a dual DVI output so you can connect two LCD monitors to your computer, or two CRT monitors using a converter. The card has 512 DDR2 on board and it value is around $100.

To enter the contest just comment on his post Who Wants A Dual Monitor Video Card? . He will make a draw from all the commentators and on Friday someone will win this card and with an extra monitor will be able to work like John Chow

This is of course one of his genius techniques to attract more visitors to his site and get more feedback in the comments of his blog.