Sunday, August 3, 2008

Sucky fonts in Ubuntu :(

This has always been pricking me for a long time. Whenever, I try to code in gedit, the fonts are so so sucky!!. I wanted a nice environment for coding, so my search for non-sucky ubuntu fonts started :)

Is there clear-type fonts in Linux ?
Yeah, very much :). All you need to do is, System->Preferences->Appearance->Fonts->Subpixel smoothing (LCD's).

You are all set to experience a sexy font style :-). Guess, cleartype fonts were patented/found my Microsoft, thank you M$ :)

Cleartype is good, but I really want those Calibri,Constantia fonts ??
Oh..yeah, Ubuntu can get you that too :). I found this neat scrip here. Just copy it, save it in your home folder as 'fonts-installer.sh', and say "sh fonts-installer.sh" on your terminal. It works :-).

Nooooooo, it doesn't :(. Tells me "There is no .fonts directory in your home.Is fontconfig set up for privately installed fonts?"

Oh..ok, nothing to worry, when Synaptic is there :).

Step 1: System->Administration->SynapticPackageManger.
Step 2: Look for the package "fontconfig" and install"
Step 3: Create a directory named ".fonts" in your home folder.

This will definitely work!!

Uh!!.. you and ur linux :P. It says "curl: not found"

Hmmm..Even I am wondering. Ideally, the code shouldn't throw that error, since it checks for wget,fetch commands on your system. Even if one exists, it should work!.

Anyways, curl is a client to get files from servers using HTTP/FTP protocol. Why fear, when synaptic is here :-). Follow the steps that I have outlined in the previous comment and install curl. Cmon, now it should work!

Arggggghhhhhhhh!!!!. Chuck it, I will code in Dev-C++. I am happy. Goodbye to your gedit and your bloddy Linux!!

Hey...Chill..what is the error now ?

trap: 47: SIGINT: bad trap!!!!!

Could you please do this ? Just comment out line number 47. Insert # before it. If you are super frust, you can go ahead and delete it. Now, run "sh fonts-installer.sh". It should work.

Wow! wow! wow!. Yaaaaaaaaayyyyyyyy, am gonna use gedit now. It definitely rocks. Thanks a ton :-)

Friday, August 1, 2008

Bookmarking favourites

I just found this simple technique of bookmarking your pages. I will talk wrt to Firefox, even though it can be extended to any browser. There are a number of sites like Php help, Java doc which provide an explanation of the API.

How nice it would be if you were to just type "php array" and the array documentation in Php comes up ? :-). Well it can be done. :-)

Step 1: Create a new Bookmark (fairly simple to anyone who uses a browser)

Step 2: Right click on the bookmark and go to Properties

Step 3: Give the location: http://php.net/%s

Step 4: Set the keyword to php

Step 5: On your location bar, say "php array", for that matter any function :-), the doc comes up :D

Am trying to do a generic method for JavaDoc also. However the Javadoc provided by Sun contains webaddress like http://blah...../api//. I am yet to figure out, how to have 2 different arguments passed to the command.
Anyways, for now be happy with this :-)

There is another cool functionality that you can add to this. Ever wondered, what your search results would be in Yahoo!, Google, etc..

Step 1: Create a new Bookmark

Step 2: Right click on the bookmark -> Properties tab

Step 3: Set location to javascript:void(window.open('http://www.google.com/search?q=%s'));void(window.open('http://www.search.yahoo.com/search?p=%s'))

Step 4: Set keyword to search

Step 5: Say "search vivek" on your location bar
Up comes 2 windows, one Google result and the other Yahoo! :D

I have another one too.
Bookmark location: http://en.wiktionary.org/wiki/%s
Try setting this up :-)

Good Luck, have fun with bookmarks :D