Saturday, December 27, 2008

vim verilog code indentation

How to (auto-)indent verilog code when editing with vim?
This link suggests inserting the following 'code' snippet into your .vimrc file. It selectively intends only your verilog code. (other code variants are also suggested in the above mentioned link, see for yourself if interested, I am posting this code because this was the behaviour that I wanted.)

au BufReadPost * if exists("b:current_syntax")
au BufReadPost * if b:current_syntax == "verilog"
au BufReadPost * let b:verilog_indent_modules = 1
au BufReadPost * endif
au BufReadPost * endif


vim commenting -- NERD Commenter plugin

Here's a link to a pretty good vim commenting plugin [by the name NERD Commenter]: link.

The page has basic functionality explanation, supported file types, how-to install and download links (in that order[;)])

In case you are not so good at hacking vimrc fileor making your own commenting scripts
(like me), use this. Even if you can do the above, this might work better at less effort -- as they say, Do not do for yourself what somebody else can do for you ;).

Extract the archive to your ~/.vim/ directory
If you want to integrate the help (doc) of the plugin with vim's do
:helptags ~/.vim/doc
within vim....

ntfs mounting

This how-to tell how to mount ntfs files on linux: link.

The story: In fedora 10 (KDE version) I am being asked the root password for file operation on ntfs partitions, So I thought it better to edit fstab.

Friday, December 26, 2008

bootstrapping link for ngspice

Here is a link to get started wit ngspice.

I was using LTspice (free tool, windows native) to "spice" up my engineering life. Though LTspice is reported to run on linux over wine (I have not tried that personally), I went overboard to ngspice. Cannot comment on how good it is, seems ok for the small 'hobby' circuits that I am doing now.

Saturday, December 20, 2008

pdf document properties -- pdflatex

If you are using pdflatex and to set the document properties of the generated pdf. Here is a link which says how to do it: link.
Just include this in your .tex file
\pdfinfo{
/Author (Author name)
/Title (Title of the document)
/CreationDate (D:YYYYMMDDHHmmss)
/Subject (how to edit the pdf doc properties)
/Keywords (word1, word2, word3)
}

Sunday, October 19, 2008

wireless woes @ fedora 9

Fresh installation : Wireless(wifi) works
System Update : Wireless(wifi) breaks
Possible culprit : Network manager update?

my config:
Chipset : the (in?)famous Intel Wireless Link (iwl) 4965

Sunday, August 31, 2008

microsoft fonts on CentOS

I wanted to install Trebuchet (and other microsoft fonts) on CentOS 5.2, x86_64 (this blog happens to be in Trebuchet font). I got the required rpm from this following site : link [http://avi.alkalay.net/software/webcore-fonts/]
I downloaded the webcore-fonts-3.0-1.noarch.rpm

# rpm -ivh webcore-fonts-3.0-1.noarch.rpm

... Worked for me

centOS x86_64 and mozilla flash plugin

I have loaded CentOS 5.2 (x86_64) on my laptop (no, I am not crazy). I was forced to such an action as Xilinx and other project tools that I plan to use was validated on RHEL and I did not want to break my head any more on cross platform migrations (fact : I am less than a noob when it comes to serious linux)

Well there was an issue of getting flash (on mozilla) (read youtube) to work on "IT". I tried different approaches suggested by different blogs / sites / forums /..., finally this worked : link (please read the 1st comment and follow instructions given there)

vim txt editing -- removing the linewidth effect

In my vimrc I have set the .txt file's linewidth property as 72 (vim enteres newline / breaks to a new line every 72 chars) (the above may be incorrect in an exact technical sense) it is cool to have this feature while editing test files, navigation being made easy between lines. But such a text file look "ugly" when posted onto blogger. There might be multiple ways to solve this problem, but the following is how I tackle the problem. Once I finish typing up (in vim) input.txt

fmt -w 1000 input.txt > formatted_output.txt

Sunday, July 27, 2008

vnstat -- internet traffic monitor

vnstat [link] is a cool console based(yet easy to use) tool which I use to monitor my bandwidth usage in Linux.

Please Note : It does not start monitoring right away. Once you install you have to run

vnstat -u -i interface

(as it says in the man page) (for me the interface is eth0 the name of my Ethernet port that ifconfig command throws out). Also to be noted is – vnstat does not automatically update the transfer statistics. Entering the command manually is a chore so I added the following line to crontab (as root/su i.e the roots' crontab)


*/5 * * * * vnstat -u


It updates the vnstat database every 5 minutes (you can give a suitable interval).

Disclaimer : I being a noob when it comes to Linux got the script form somewhere else (on the broad internet) but now that I search for the source site I cannot find it and hence cannot acknowledge the source : to the anonymous source – thanks a lot.

yumex -- gui for yum

If yum's (the package manager of fedora) console operations seems “uncivilized” to you a nice little package that gives you a gui front end for yum [link] is “yumex”. Type in (with su privileges)

yum install yumex

to install yumex. And yumex your way to nirvana.

hello world

Hi, all
I cordially welcome one and all here.
I am starting this blog as a place to post out all the (hardcore) tech funda (gyaan). Which I though would be better kept off my other (generic) blog [link], to avoid scaring off wayward visitors there. The posts maybe rare, more so in the beginning, I hope that this space will become more active by some unspecified future date.

Have fun ....