Ankit, originally uploaded by May Founder.

Last weekend me and couple of my friend visited Lava Beds National Monument. While visiting one of the caves one friend had an idea of creating a light writing picture.

This is my first trial with it, and amazingly I got a good picture out of it.

Back to Library…

Today ( 18th ) was a wonderful day. I am not sure of the specific reason for today to be a special day. Could be because I slept in late afternoon after a long time or had a cup of strong café mocha or I read 4 chapters of “A Beautiful Mind” ( an achievement for me, looking at my statistics for last 2 years ).

Evenings on weekends are something that I dread if I dont have any specific thing planned out, I cant do anything new nor can I do what I always want to do. But today was good, just woke up in evening and went to Coupa Café ( ofcourse on insistance of a friend, I am too lazy for such things ). I had some mocha while we chatted for sometime ( some usual stuff that I myself dont have an answer to ) and then we decided to go to stanford. It was almost 9pm by the time we reached standford.

We discussed some points and then decided to go to a library and read. I started reading the book and wow I did not feel like getting up until 11:00pm, when I finally felt I should be leaving. Not because I got bored, but because I felt its too late for me.

It was a wonderful expereince; I havent had such experience since I graduated ( Or dont have strong recollection of any ). I think I should do this more often, somehow a cup of coffee and books start a strange kindof feeling in me that makes me forget the sense of time and increases my thought process ( yeah, I know its stimulating nature, somehow I feel its too high for me ).

P.S. Why I wrote this article? I think I had too much coffee ;)

Adding a new TTF font to Linux

One thing that keeps me doing development on a Mac OS X is its awesome Monaco font. I saw the font first time while using Mac in my college, and I fell in love with the font ( yeah, that sounds crazy… ). I prefer Monaco over very popular terminal fonts like courier or courier new. Monaco is as crisp as courier and at the same time as sober as Helvetica.

Ok. Now to the main point.. I have been using Linux almost 10 years now. I remember from the initial days, adding a new TTF font in Linux; I always felt the steps to be too much cryptic.

After a long time today I found a seemless way to install a new TTF font.

And as Monaco is my favorite for terminal programs, I’ll show the steps using Monaco.

  1. Download a TTF font or fonts file. In case of Monaco just download it from here.
  2. Unzip, gunzip, untar, bunzip2 do whatever is required on the fonts file. For Monaco we do nothing.
  3. Copy the .ttf file to a nice place.
    $ sudo mkdir /usr/share/fonts/truetype
    $ sudo cp Monaco_Linux.ttf /usr/share/fonts/truetype/
  4. Now we need to create required files for the new fonts ( i.e. fonts.scale and fonts.dir )
    $ cd /usr/share/fonts/truetype
    $ sudo mkfontscale
    $ sudo mkfontdir
  5. This creates the required files, now we need to add the fonts to cache. One way to do it is add to cache and restart X Font Server
    $ sudo fc-cache
    $ sudo chkfontpath --add /usr/share/fonts/truetype
    $ sudo /etc/rc.d/init.d/xfs restart

    OR easy way to do it is refresh the cache forcefully. Which does not require restarting the server
    $ sudo chkfontpath --add /usr/share/fonts/truetype
    $ sudo fc-cache -fv
  6. Restart the program you want to use the font in.

You can always copy the fonts in ~/.fonts directory if you don’t have root access.

References and Resources:

Tags: , ,

Bluetooth Proximity

Recently I stumbled across this awesome utility called Proximity. Its a neat small utility that detects if you are near your system or away from it. And it does this by checking the status of your bluetooth phone. Hence the range for away is about 30ft.

This is a pretty useful thing. Couple of ideas that come to my mind for its use are

  1. Use bluetooth to lock your computer
  2. Use bluetooth to change Messenger Status
  3. Use bluetooth to play/pause a movie

Here is a list of AppleScripts for the ideas above

Start Screensaver using AppleScript

tell application id "" to launch
end try

Stop ScreenSaver using AppleScript
tell application id "" to quit
end try

Please note that if password on wake is set true then it will ask for password

Go Away in Adium using AppleScript
tell application "Adium" to go away
Available in Adium using AppleScript
tell application "Adium" to go away
Play and Pause VLC using AppleScript
tell application "VLC" to play
The same script plays and pauses a file

Tags: , , , , ,

Hello world!

Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!