Wednesday, January 20, 2010

git color customize

Did you watch the movie Matrix? I think the answer is obviously yes. I am a very good fan of that movie. After watching this movie, my Linux theme, wallpaper , screensaver changed to that theme, specially the terminal. I use Konsole with Green and black schema. So it is a little bit fuzzy when I use “git diff” with default auto color system of git. So I customize the color by editing the “.gitconfig” file on my home directory.

[color]
ui = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = white
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = white bold
[color "status"]
added = yellow
changed = red
untracked = cyan
[user]
name = Towhidul Haque Roni
email = towhid@xyz.net

Thursday, January 14, 2010

Make IDEA faster

I was working on a renowned XYZ software company. They prefer IntelliJ IDEA as a IDE. My senor collogue give me some task and I was working on the IDEA. He found the IDE is too slow and suggest me to increase the virtual memory. So I have change it in the “idea.vmoptions” file located on (/idea/bin).
======================================
-Xms700m
-Xmx1024m
-XX:MaxPermSize=450m
-ea
=====================================
But it seems too slow for scrolling the codes on IDEA. Then my senior suggests me to use version 6 instead of version 8. But I was working with IDEA 8 and looking for a solution. Suddenly senior bro came to me and wanted to see my progress. When he found IDEA version 8 he became angry and warn me he will delete all my code. I was so scared though I have IDEA local history and git ;) . Then I suddenly found the solution that it frequently uses graphics card but I know that it is not NFS(my favorite game :P) so I can disable that by including
-Dsun.java2d.pmoffscreen=false
At the end of the “idea.vmoptions” file. And the problem solved :D

@decorators in Python

People have confusion about how to use python decorators in the proper way and how it works. The main reason for it is there are several way...