Geek test

I just have taken geek test. Result surprised me. Look at it:


My computer geek score is greater than 100% of all people in the world! How do you compare? Click here to find out!

Eh, personally, I don’t feel like a 100% geek. I have some other interests. Really.

Discussion Join the discussion (0 comments)

A simple way to install new ttf fonts on linux

Recently, I faced with a typical office problem. I was made to create diplomas layout for my school. Although, I’m not an artistic person, I agreed to do that task.

One thing that I needed was a sophisticated font. More creative than standard “Times New Roman”. So I visited one of that sites with free fonts and found a suitable one. It looks similar to handwriting.

My troubles started when I tried to install it. According to documentation, adding new fonts to X.org is a bit complicated. I could do that, but luckily I didn’t have much time so I look up for a simpler solution. Shortly I discovered in my gentoo OS a folder .fonts. It is located in user’s home directory. I copied there .ttf files and everything ran out of box. For me it’s a nice solution for that problem.

Discussion Join the discussion (0 comments)

What time is it?

Recently, I was writing judge system for my high school for algorithms competitions. Because of short deadline and other activities, I was coding it in a hurry. During this project I experienced strange behavior of linux command “time“.

I knew that “time” can measure time as well as memory used, so I look into manual to see how I could accomplish that. Man said that I need to use -f option. So I typed:
[code lang="bash"]
time -f "%M %e" ./program
[/code]
and get:
[code lang="bash"]
bash: -f: command not found
[/code]
After working out for a while I noticed that there are two types of “time“. A bash built-in and a standalone version. Option “-f” features in standalone version. Although “which” points to standalone version, the default command is built-in. To use more sophisticated “time” program, it is needed to give full path. Such as:
[code lang="bash"]
/usr/bin/time -f "%M %e" ./program
[/code]

To change default version to standalone GNU time I used alias:
[code lang="bash"]
alias time="/usr/bin/time"
[/code]

Sometimes a little of thinking is required to solve strange problems. However that doesn’t change the fact that current state of “time” behavior is weird.

Discussion Join the discussion (1 comment)

Installing printer HP Deskjet 710C in cups

I recently heard that many people have problems with setting up printing in linux. In fact the popular linux printing daemon – cups is often problematic. However, as long as you can read logs, think and use google, every problem with it is solvable. Here is my story:

(I assume that you have already installed cups)
First of all look at site about printing in linux. Find out what driver your printer use and download .ppd file for it. If your printer use no-postscipt driver install that driver. In my case (HP 710C) I have to install foomatic (emerge foomatic). I also copy .ppd file to /usr/share/cups/model/. I need to modify config file (/etc/cups/cupsd.conf). I replace line Listen “*:localhost:631″ with “Listen localhost:631″. Than I run cups daemon (/etc/init.d/cupsd start) and type in web browser localhost:631 and simply add printer. After that steps printing works.

Useful logs are located in: /var/log/cups/
CUPS is sometimes difficult to configure, mostly because it gives strange errors messages. Despite it require some basic knowledge, installing a printer shouldn’t be a problem for advanced user.

Discussion Join the discussion (0 comments)