Tuesday, December 8, 2009

Remove "right click disabled" from web page

Quick hack. Just for the fun of it.

1. Download the web page.
2. Open the html in any text editor. (Notepad/wordpad...)
3. Search for "onmousedown" in the code. This should be
part of some Java script like:

function right(e) {
var msg = "Sorry... Not allowed to copy";
if (navigator.appName == 'Netscape' && e.which == 3) {
alert(msg);
return false;
}
else
if (navigator.appName == 'Microsoft Internet Explorer' &&
event.button==2) {
alert(msg);
return false;
}
return true;
}
document.onmousedown = right;


4. Delete that entire block of code. Save the page.
5. Re-open page in a browser and et-voila... right click works :)

Sunday, November 29, 2009

How to enable open "command line/window here" in Vista by default

Though this option is available by using the right click
option on the mouse while pressing the shift key, you
can enable this feature just by right clicking the folder.

Steps to follow are:
  • Click Start, Run and type Regedit.exe
  • Navigate to the following location:

HKEY_CLASSES_ROOT\Directory\shell\cmd

  • OPTIONAL - [Backup the branch, in case you need to undo the setting later, this can be done by choosing export on the file menu of regedit tool, and saving the file in a safe place. To restore this setting just double click the saved file to merge and undo registry changes.]
  • In the right-pane, delete the REG_SZ value named Extended
  • Close Regedit.exe

Monday, November 23, 2009

SSHd port forwarding not working

Only thing to do is to use "ssh -X"
at every stage please check if the display is pointing to the right place.
If not, please check configuration for X11 forwarding in /etc/ssh/sshd_config

If this is not enabled, say yes and enable it. Restart sshd by going through
/etc/init.d/ssh restart

This should do it.


Vimp: If you are working on windows make sure you have something
that has an X environment.

Saturday, November 14, 2009

Linux intel - wimaxd gets killed

Make sure you are starting wimaxd as root.
Else, you will notice that it gets silently killed
with no information at command line. You can
check the log at /var/log though. Starting wimaxd
as super user solved the problem for me.

Bash bad substitution error - array access

If you ever come across this error while migrating a
shell script from one machine to other, please ensure
that you are using the same shell to execute the script.

Typical error-
test.sh: 4: A[9]=123213: not found
test.sh: 5: Bad substitution

i.e if you used "sh filename.sh" to execute the file, please try
running it using "bash filename.sh". It solved the problem
for me. It had nothing to do with malformed braces while
accessing the array nor user permissions on the script.

Good luck!

Tuesday, November 3, 2009

Debain/Ubuntu Linux Headers - 3Steps

Installing kernel source with apt is just so simple-
$>sudo apt-get update
This will update information from the apt repository.

$>sudo apt-cache search linux-headers-$(uname -r)


This should return the name of the package with the
current kernel headers along with a short description.

$>sudo apt-get install linux-headers-$(uname -r)
This command will install the kernel headers.

Monday, November 2, 2009

Why does a car slip on thin ice in winter?

Because the thickness of ice/layer of water should
be only so much that it reduces the coefficient of
friction between the wheels and the road to zero (or small
enough), while not introducing friction due to its
own thickness.

Interesting huh?

Friday, October 30, 2009

What is a debain backport?

Backports are packages from testing and unstable
debian distributions such that they can work with
older packages in a stable distribution of debian.

Backports are made available so that some of the
latest features in unstable and testing versions of
debian can also work with older stable versions.

Monday, October 12, 2009

Latex: file ended while scanning use of @writefile

This error is typically seen a lot while compiling latex on windows.
This can be eliminated by deleting all .aux files and recompiling
the latex code. Recompilation should begin by running "Latex" before
any other tool, this helps re-generation of the .aux files.

Ensure that after deleting the .aux file, you also remove the
error that was causing a compilation failure before re-compiling
using latex. Errors could be as simple as missing $$ signs for math
operators.

This also works for the following error:
Runaway argument?
! File ended while scanning use of \HyPL@Entry.

                \par
l.38 \begin{document}

Thursday, October 8, 2009

What is the SKB in Linux?

Skb is usually an instantiation of the structure
supported by the linux kernel buffers (struct skbuff).

Skbuffs denote the buffers which are used for
handling of all packets in the Linux kernel. These
buffers are frequently used for interaction with the
kernel network stack.

Tuesday, September 29, 2009

Openscmanager failed - Iperf

You see this error while running iperf on windows. This
error is primarily because you are not running the windows
command prompt in privileged mode.

To remove this error, close your command window. Right
click on the command window option through the start
menu and "run this application as administrator"
Navigate to the location with the iperf executable, and
give it another shot.

This should solve the problem.

Monday, September 28, 2009

60 ghz Wireless Applications (WiGig)

Given that you could now have superior
performance (doing up to 15 Gigabits per second) with
the 60GHz unlicensed radio band, the main
question that comes to mind - What are the
applications of such a technology?


Is it just another technology that finds limited
applications of being a single link? As it turns out
this radio range has long been used for inter-satellite
communications due to the high O2 absorption.
This helps secrecy and avoids any sniffing from within
the earth's atmosphere. Other applications could be
in the direction of TVs connected to set top boxes through
such a connection.


Though this link is limited only by the distance over which
it can be sustained, this radio is now a reality and applications
for this product are only limited by imagination.

Tuesday, September 15, 2009

Unknown symbol error - Intel WiMAX Driver

Can occur when compiling a driver or
the kernel itself. This is typically due to
a kernel module not exporting symbols
properly. In our case we see it while compiling
the wimax drivers and installing corresponding
modules.

In most cases this can be fixed by changing
the EXPORT_MODULE_GPL() function
call in all source files to EXPORT_SYMBOL().
and re-compiling all source code.

The replacement can be done using sed.

Friday, September 11, 2009

Openssh server control - start /stop/ in debian

Commands to control ssh server-

/etc/init.d/ssh start

/etc/init.d/ssh stop

/etc/init.d/ssh restart

Install Xserver Linux - Debian

sudo apt-get install xorg gdm xfce4
or
sudo apt-get install xorg gdm fluxbox
or
sudo apt-get install xorg gdm icewm
or
sudo apt-get install xorg gdm gnome-core
or
sudo apt-get install xorg gdm kde-core

main thing is "sudo apt-get install xorg gdm" that is the X environment.

Saturday, September 5, 2009

Create jpeg with gnuplot

Gnuplot allows you to create and save
a jpeg file too. All you need to ensure
is that you include the following two
lines as a part of the gnuplot code-
set terminal jpeg
set output filename.jpeg
The set terminal line helps to set the
terminal type while the second line
gives the name of the jpeg file to which
the plot is saved. Please ensure these lines
are included before the plot command
in the gnuplot script.

Wednesday, September 2, 2009

What is the edas similarity score

I would really appreciate if someone could provide an
insight in to what it really means. It seems that this
functionality is only available to chairs.

Based on the very useful comments, I am updating
this post. The score ranges from 0-100 indicating
the similarity of the article to other papers. Lesser
the better! Conference chairs use this tool for
determining paper similarities. To quote edas "High scores,
e.g., above 30, may indicate that parts of the paper
have been copied from elsewhere." So beware!

The similarity score can be seen or located on your
edas submission next to the pdf submission and format
checks.

Tuesday, September 1, 2009

Gmail down

Yep, just like May 14th.. its down again!!
I hope ppl still trust the whole cloud computing!

Thursday, August 20, 2009

Solution to: File ended while scanning use of \@writefile

Recently came across this error in latex. This shows up every
time I try to compile the code after I first saw this error and
restarting my system or the latex editor did not help-

> Runaway argument?
> ! File ended while scanning use of \@writefile.
>
> \par
> l.110 \begin{document}

This error is seen typically because of an incomplete
entry in the aux file and can be removed by
deleting the file with .aux extension in the latex source.
To re-generate these aux files "latex" needs to be run.
Note - you have to run latex and not texify or any
other tool.

Good luck.

Tuesday, August 18, 2009

ping: sendmsg: No buffer space available (Madwifi/Atheros)

I set up a STA-AP network
Interface fails after approx 2 minutes.
ifconfig/ifdown/ifup does not bring the interface back up.

Pings show-
...
64 bytes from 192.168.10.1: icmp_seq=12 ttl=64 time=0.819 ms
64 bytes from 192.168.10.1: icmp_seq=13 ttl=64 time=0.673 ms
ping: sendmsg: No buffer space available
ping: sendmsg: No buffer space available
ping: sendmsg: No buffer space available
ping: sendmsg: No buffer space available
ping: sendmsg: No buffer space available

Increasing the queue size by using the following command helped-
echo 83886080 > /proc/sys/net/core/wmem_max
Do let me know how it works for you.

Monday, August 17, 2009

Latex Error - something's missing maybe a \item

Encountered an error in late while compiling references
using Bibtex. Typical error seen was-
something's missing maybe a \item
The solution to this problem is by running "Latex"
before running Bibtex since it helps to generate
the necessary .aux files.

Friday, July 31, 2009

Error for wireless request "Set Bit Rate" (8B20)

Occurs when you fail to specify the rate with-
iwconfig ath0 rate 36M

Changing default page in folder on a webserver

The easiest approach is to change the .htaccess file
in a local directory. Edit or create the .htaccess file
in the local directory to include the following line-

DirectoryIndex default.file

Friday, July 3, 2009

Dynamic IP update

Whatismy.com allows you to track your IP
dynamically every 300 secs using-
http://whatismyip.com/automation/n09230945.asp

Sunday, June 21, 2009

Latex Algorithm2e Comment Insertaion

Use the following line in the algorithm description-
\CommentSty{ //Test comment }\;
You can also enable numbering for comments,
if numbering is disabled in general by -
\commentsnumbered

Saturday, June 20, 2009

Latex too many }'s - algorithm2e

Algorithm2e package seems to be incompatible
with the ACM latex classes. The error thrown is
similar to that shown here -
! Too many }'s.
l.1616 }

?
The way around this is by including the following
lines before including the algorithm2e package as
follows-

\makeatletter
\newif\if@restonecol
\makeatother
\let\algorithm\relax
\let\endalgorithm\relax
\usepackage{algorithm2e}

Hope it works for all of you! Let me know if
you run into any issue.

Thursday, June 18, 2009

ACM Latex \and tag

Use '\and' if you need 'another row' of author names.
This tag is used as a part of the \author tag in the ACM
latex template for paper submission.

What is the SAR level?

SAR level is used to describe the safe exposure level
of electromagnetic radiations typically produced by
mobile devices for the human body. SAR stands for
specific absorption rate, which stands for the amount
of radiation power in Watts absorbed by per kilogram
of tissue. Hence-

SAR = (Electrical conductivity of sample * E^2)/density


The FCC limit for public exposure from cellular telephones
is an SAR level of 1.6 watts per kilogram (1.6 W/kg).

A list of the top 20 handsets for highest and lowest mobile
emissions is available on CNET.com

Sunday, June 14, 2009

Debug not working - Bloodhsed Dev C++

If debugging is not working try these two steps-

1. Go to the tools menu, and within the compiler
and linker options please enter "-g". Ensure that
this is enabled both for the compiler and linker.
This essentially enables generation of all debugging
information.

2. Also, within the Tools -> Compiler options ->
Settings tab. Select the linker option and enable
the "Generate debugging information" by saying
yes

Initial declaration used outside C99 mode

C99 is a recent standard of C than the one GCC which is used by default.

E.g.Declaring the loop counter inside the for loop is only allowed in C++ files
unless you tell GCC to use the C99 standard. For C and ObjC, you need
to declare i outside the loop.

Tuesday, June 2, 2009

Yahoo Messenger 9 does not connect - Vista

I had an older version of yahoo messenger (7) running
happily on my machine. While I was hunting for reasons
why 9 would not always connect on my machine, despite
checking a lot of other reasons such as firewall config etc.

I think the eventual solution is by not doing a typical
install and NOT installing the yahoo toolbar. This has
solved the problem for me.

Friday, May 22, 2009

What is a virtual bridge Virbr0 ?

A virtual bridge, can be defined as a device that
bridges virtual interfaces. It provides an easy
means of networking virtual networking devices
such as venet (virtual network) or veth (virtual
ethernet).

Typically, a virtual bridge Virbr0, has point to
point devices such as venet devices. So whenever
traffic is directed from the kernel to one of the
guest VMs / virtual containers, if the vbridge
is configured with the right IP address and subnet
information, it accepts traffic from the kernel.
Internally, the bridge then forwards the packet to
the correct venet interface as it learns their IPs.
So the typical configuration is -

virbr0 ----------> venet0 -----> eth0 192.168.10.2
|
----- > venet 1 -----> eth0 192.168.10.5

In this case virbr0 could have an IP of 192.168.10.7/24.
Hence virbr0 takes all traffic for 192.168.10.0 and
sends it to the venets which are typically point-point
devices.

If you have any questions please post a comment.

Command to ssh tunnel using vncviewer

VNC viewer provides a command line option to
tunnel over ssh, without having to run a separate
ssh session with X window tunneling.
vncviewer -via native@10.49.3.45 vm99:1
The command uses the via switch. In this example,
the vncviewer will reach the display #1 of vm99
by running an ssh session through 10.49.3.45,.
with the user name native. Such a command is
typically useful while accessing virtual machines
(such as KVM guests, OpenVZ containers)
running on other machines.

Thursday, May 21, 2009

Iperf: write2 failed: Operation not permitted

I have seen this error thrown by Iperf over and
over again. Can anyone please post a comment
and let me know why this is happening?

That should be useful. I am guessing this is
because iperf fails to establish an end to end
socket connection between the client and the
sender.

BSE Trading Simulator For Stocks/Shares

For investors who wish to have an experience
trading stocks on the bombay stock exchange,
an excellent facility is provided by the Singapore
Stock exchange. The Singapore stock exchange
provides real time stock quotes, for a real time
trading simulation. This is one among the best
trading simulators available online for free -

http://futuressimulator.sgx.if5.com/Default.aspx

Do give it a shot.

Tuesday, May 19, 2009

What is the Bluetooth sniper riffle

I just learnt today that it is possible to sniff
traffic from bluetooth transmission, such
as from your wireless headset to your cell
phone over almost a mile. The device needed
for doing this is called a bluetooth riffle. More
information on how to build a bluetooth
riffle is available on boing. Considerable
number of news reports are available
on google that discuss how the riffle can
be used to sniff out vulnerabilities.

Sunday, May 17, 2009

3G service in Mumbai, India

Just read an interview from the Mahanagar telecom
Nigam Limited (MTNL) chief about launching a 3G
service in Mumbai and Delhi. Details are not available
as of now. The company is also not discussing possible
avenues for generating revenue for the spectrum
and the towers. Some discussion is bound to issue
with the sharing of cell towers but nothing beyond
that. The chief even fails to quantify a possible time
in the future (1yr+) when they will possibly break
even. This is even when they are hoping to rope
in 1 Lakh subscribers@ Rs1000/mo.

Interesting to know about this development.
It will be nice to see how this affects the share price
in the BSE (bombay stock exchange).

Friday, May 15, 2009

Difference between throughput and goodput?

Goodput measures the rate of data transmission/reception
at the application layer without taking into account
retransmissions. Applications like iperf typically report the
goodput seen by a typical application layer when operated
in TCP. However if iperf is used with UDP, which is a best
effort protocol, it is a better idea of the throughput seen on
the channel being measured.

Throughput is typically measured at layer 2/3 of the
network stack, thus including protocol overheads and
any retransmission. Hence in quite a few cases the
useful goodput is <<< throughput measured. For
example in file transmission, the "goodput" corresponds
to the file size (in bits) divided by the file transmission
time.

Monday, May 11, 2009

What is an earth browser?

An earth browser can be defined as a
software that allows the user to view
2D and or 3D maps of the earth.

Examples of earth browsers are -
Google Earth, Earthbrowser.com/.
Apart from being a viewer for the maps,
the google earth browser also supports
a XML based programming interface.
The language is called as the Keyhole
Markup language (KML) named after
one of the first reconissance satellites
launched in 76. The KML schema allows
the user to place and move objects over
google earth as a baseline application based
on point co-ordinates of the location.

Friday, May 8, 2009

What is a MATLAB mex file?

A mex file is a matlab source type file
that allows the user to compile partial code
as C/C++ code. MATLAB runs an interpreter
for running the code. Since code interpretation
is usually slower as compared to running
pre-compiled binaries on a machine, MATLAB
provides an approach to do this by using the
built in mcc tool.

These mex files define certain entry points
in a standard matlab code where, a function
call is translated to a C/C++ code and later
accept values from the computed results.
Such an approach finds a lot of application with
compute intensive operations such as graph
search or image recognition which can be done
better with optimized C code.

Thursday, May 7, 2009

Difference between Cell Broadcast and MBMS

Both services are a part of the GSM standard. However,
MBMS is also used with UMTS.

Cell broadcast is a part of the GSM standard
and is used to send a broadcast message to
all subscribers from a particular cell. This service
is a pseudonym for the SMS-CB - Short message
service - Carrier broadcast. The other version of this
service - SMS-PP - point to point link is the version
used with the standard SMSs. SMS-CB was designed
for emergency purposes where the provider can
send emergency message to all users within a cell.


With Multimedia broadcast multicast the architecture
provides a means for the users of the service to interact
with the service provider. Along with the standard broadcast
service MBMS provides the advantage of having a
two way multicast.

Possible DNS spoofing detected

This is a typical warning thrown in an ssh session that
occurs when the public key for the remote machine that
you are either trying to log onto or scp onto has been
changed. Typical error seen is on this lines -
misfit@mufasa:~/ ssh misfit@10.12.12.22
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: POSSIBLE DNS SPOOFING DETECTED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

The RSA host key for node1-1 has changed,
and the key for the corresponding IP address 10.12.12.22
is unknown. This could either mean that
DNS SPOOFING is happening or the IP address for the host
and its host key have changed at the same time.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
2d:47:fd:c3:1a:19:69:f7:ca:35:
2b:cc:b5:69:07:db.
Please contact your system administrator.
Add correct host key in /home/misfit/.ssh/known_hosts to get rid of this message.
Offending key in /home/misfit/.ssh/known_hosts:
1
RSA host key for node1-1 has changed and you have requested strict checking.
Host key verification failed.

The solution to this is as posted in the message, either
the user can clean the known_hosts file and try to login
again. The known_hosts file is located in the .ssh folder
in the home directory or alternately just changing the
entry corresponding to the remote machine in the known
_hosts file.

Tuesday, May 5, 2009

What is inside the .ssh folder

To go to your .ssh directory do the following -
misfit@mufasa:~/$ cd .ssh
After reaching inside the .ssh directory list the contents -

misfit@mufasa:~/.ssh$ ls -ltr -a
total 64
-rw-r--r-- 1 misfit far_away 622 2006-09-29 11:15 id_dsa.pub
-rw------- 1 misfit far_away 668 2006-09-29 11:15 id_dsa
-rw-r--r-- 1 misfit far_away 415 2008-09-03 17:28 id_rsa.pub
-rw------- 1 misfit far_away 1751 2008-09-03 17:28 id_rsa
drwxr-xr-x 60misfit far_away 36864 2009-04-29 17:48 ..
-rw-r--r-- 1 misfit far_away 1082 2009-05-05 14:27 known_hosts
-rw-r--r-- 1 misfit far_away 622 2009-05-05 14:30 authorized_keys
drwx------ 2 misfit far_away 4096 2009-05-05 14:30 .
The *.pub entries are the public keys that may be generated by you.
The id_* files are your private keys and are usually with permissions 600.
The file authorized_keys has information on the public keys for allowing
password less logging to this machine. The known_hosts file has
information about machines you had previously logged onto (including
public keys). Since machines change their public keys from time to time,
the public key entries in this file change and need to be amended.
Typical entry in a known_hosts file looks like -

misfit@mufasa:~/$more .ssh/known_hosts
node1-1,10.11.1.1 ssh-rsa AAAAB3NzaC1yc2EAAA
ABIwAAAIEAw3eXxgVyiF7UDkKGQ13WyIJ/J1h1
G3xmVVddYJyiHrpHD/LAjmqseQHHtImT+uGW
X8ngzwThGo1wavNBWN9E7GkIiAQ8EhKVJWfQ
f9xZhlrFvfO8Qe5Hyy3

Hope this was useful. If a public key is no longer valid.
Remove the appropriate entry from this file and re-login
to repopulate this entry.

Monday, May 4, 2009

Comparison between google's Bigtable and amazon simpledb

Recently I have seen a lot of disucssion relating to
the comparison between the much touted Google
Bigtable database and the Amazon SimpleDB solution.
The BT (bigtable) is an internal database system used
for different projects which could be made open to public.


Amazon's simpleDB solution is currently available to
customers who sign up for the web service. The first
level of comparison shows up in terms of pricing of
the service. Some articles such as this and a
couple of others discuss the pricing issue.
Some even contemplated the Google service being
free.

Another factor is the ease of use. Some articles contemplate
and debate that the Google approach would not only
try to compete based on size but also on the basis
of functionality. Since Amazon is known to provide
bare bones services in most cases, (sometimes
requiring third parties to develope and build on it),
the users are expecting google to provide a better
usability model.

An approach to give a shot to the google's bigtable service as a
testride is available here - http://bigtable.appspot.com/
This provides a web interface for working and creating tables
that can be accessed from the web.

A possible plus working with the amazon solution could be
easy integration with other services like the amazon ec2 and
(elastic cloud computing) and the amazon s3 (storage).

Sunday, May 3, 2009

Maximum number of security cameras - Airport

Recently read a web article which said that
London's Heathrow international airport
had the maximum number of surveillance
cameras. I got reminded of the fact when
I read another related news story that talked
about security cameras that could see through
clothes. Not surprisingly this news was from
London too. The camera - ThruVision T5000
can see through clothes of ppl up to 25m away
and is based on imaging using the Terahertz
(T-ray) technology. Not bad!

Difference between IP camera and a USB webcam

IP cams are closed circuit tv cameras that were built
with the primary purpose of monitoring and surveillance.
These cameras are capable of working in areas with little
light and good at detecting change in the environment.
Typical resolution with such cameras ranges from 420
to 560 tv lines. These cameras can be connected over
a fast ethernet link to a controlling stations where their
feed could either be displayed on a closed circuit tv or
fed to software for presence detection/analysis. Alternately
their feeds are also recorded and archived for
analysis after a particular incident such as theft/
burgulary.


Web cams are devices that can be used for computer
systems and are used for personal purposes such as
video conferencing (or video chatting for individuals).
Most web cams come with a USB connection for use
with computers. Thes cameras are capable of use in a
well lit environment and for objects in fair focus. It
is important to note that some of the newer webcam
devices are also being considered and used as security
cameras that archive and send videos over the network
when they detect motion/sound/both.



Resolution of commercial grade security cameras

Some of the latest security CC cameras like the
HDC518 High Resolution Day/Night Security Camera
have a resolution of 560 lines. Other models like
the Swann Model SW-C-BDOGC come with 420 lines
tv quality. Most cameras come in the range of
about $100 to $500.

Thursday, April 30, 2009

Command to determine user id in Linux/Unix

User id is an unsigned integer used in the
operating system for a particular user.
The user id can be determined by executing
the id command as follows -
node1-1:~# id
uid=0(root) gid=0(root) groups=0(root)
It is interesting to note that root always has
the uid of 0. Use the -g switch to find out
which groups the current uid is a member of-
node1-1:~# id -g root
0
Another approach to determine the uid of a user
is by grepping through the /etc/passwd file. That
file has all information specific to a particular user.
Another nice thing to remember is that daemons
always operate with an uid of 1.

Wednesday, April 29, 2009

How to submit site to google for crawling

The approach to do this is by visiting the webpage -
http://www.google.com/addurl/?continue=/addurl
The page will ask for the URL and some basic details
about your webpage. Google does not make any
assurances about the crawling.

How to install centos packages on debian

A package that can usually be installed on a CentOS
distribution is a file that works with the redhat
package manager ( with the extension .rpm).


To install that file on a debian system, I recommend
the use of the alien debian tool. To use the tool
you will first have to connect your machine to the
internet or alternately have access to debian
package repositories.

$> apt-get update

$> apt-get install alien

These two steps should install the alien package
on your system. Use the following commands to
generate the .deb file -
$> alien -k your_rpm_name.rpm

This takes some time to execute depending on the
size of the package you are trying to debianise.

After the debian package generation is complete you
can use the dpkg tool to install the package as -
$> dpkg -i your_rpm_name.deb

Alternately, alien allows you to directly install the
rpm by using the -i switch.

Tuesday, April 28, 2009

Minimum interest to get 1099

You will not receive a 1099-INT from your bank
if the interest you earned in the financial year
is less than $10. However, federal laws require
you to report all interest earned.

Only interests less than 50c could be
dropped due to rounding off. YTD interest
paid is available on yearly statements
issued by your bank.

Monday, April 27, 2009

W7 processing time

It is said that the IRS should take less than
8 weeks for processing the W7 form which
provides a new ITIN (income tax identification
number)

Latex package not found

Came across this problem the other day. Usually my version
of Miktex automatically locates a package from the
repository, download and installs it. This time it did not
work and due to the absence of the required package
my latex code would not compile.

An important check to perform would be to find your
Miktex version. This can be done by checking different
options on your editor or an easy alternative is typing
latex on the command prompt which shows the
miktex version -

C:\Users\mufasa>latex.exe
This is pdfTeX, Version 3.1415926-1.40.9 (MiKTeX 2.7)
**
! End of file on the terminal... why?

If you are using Miktex version 2.4 or before, you will not be able
to download any new packages, as all repositories have been
removed and you need to install a newer version of miktex.

Follow our post on getting Latex running on windows for more info.

Working with latex on windows - The 3 step guide

There are 3 essential steps to get latex working on
windows -

1. Miktex - Miktex is the latex package for windows
and must be installed before doing anything. A simple
way to get this package is by visiting the site -
http://miktex.org/2.7/setup.

Multiple options are available for installation, with the
most popular and widely used option being the ~80MB
installation with popular packages.

This is a windows installer file and is pretty self explanatory.


2. Ghostscript and GS View- These applications are
majorly required for working with postscript files and
strongly recommended for newbies. The installation
files can be found at - http://pages.cs.wisc.edu/~ghost/


3. An editor - WinEdt - Technically the user could work
with any editor but my choice is Winedt, because of its
particularly simple and intuitive interface. The software is
available at - http://www.winedt.com/installing.html
This link also has detailed installation instructions - and
how it works with Miktex and ghostscript.

If you are finding it hard to locate and download any
of the source mentioned here, googling the name with
a download tag should help you locate a resource.

Friday, April 24, 2009

How to partition with Windows XP having only single C drive ?

There are two ways to resolve this issue:

1) Reinstall Windows XP from a bootable CD and create an install partition that is smaller than the total capacity of the hard drive. But with this, everything on the hard drive, including data and applications, will be lost when the drive is formatted.

2) Use any external program like
      a) Acronis Disk Director Suite (Click For Download)
      b) PartitionMagic by PowerQuest (Click For Download)
      c) Partition Commander by V Communications (Click For Download)

Thursday, April 23, 2009

How to resolve blur image/picture problem with logitech webcam?

Recently I came accross "Blur Picture" problem while using 
Logitech webcam with yahoo messenger. I found that even 
if you select "Broadcast my webcam with - Better Quality" 
option from Messenger -- > Preferences, image is not very
clear.

Solution to this problem is :
1) Make sure the Webcam is connected and detected 
     correctly by messenger.
2) Then from Yahoo Messenger main menu listed at the top,
     select "Messenger" --> "My Webcam" --> "File" --> 
     "Preferences" --> "Webcam" option.
3) Select "Camera Settings" listed at top left corner in 
     "Webcam" option.
4) Adjust "White Balance" value till your image is clear.
     (I used "7950" and my image was very much clear.)
   
Note: 
  Some times you also need to adjust other values listed
  on the same page like contrast,brightness,sharpness etc.

Enjoy sharing your clear image with your friends/family.


Note :
  1) You can change any of the image values any time 
       during broadcasting.
  2) Make sure that you restart the chat window from which
       you are sharing your image.
  3) "Webcam " option mentioned in step 2 can also be 
       directly selected from chat window from where you
       want to share your image.

Saturday, April 18, 2009

How to include HTML code in a blogger blog post

I noticed that posting html tags (specially misformed ones)
results in the blogger throwing an error or displays the
content wrongly.

There are two alternatives to resolve this issue -

1. The simple approach - It is easy to use this approach
if the lines of html code you want to put on your post are small.
The only thing that needs to be taken care of is the following
substitution - replace all less than, greater than signs that
are part of html tags with &ltsemi-colon and &gtsemi-colon.

E.g. Consider the following line of html code
<img alt="Photo" src="http://URL_to_my_image.gif" />

would be written as -
&ltsemi-colonimg alt="Photo" src="http://URL_to_my_image.gif" /&gtsemi-colon

in your post to show up correctly on the post.

Note in all of the above cases please replace the semi-colon with ;
I am not able to include the actual symbol as a single string since it
shows up as a < in my post.

2. The second approach - relies on using html framing.
You can edit the code in a way to include your html page as
a frame in the post. This is specially useful if you are posting
a large peice of html code.

Hope this works for you. If it does not, please feel free to post
comments.

How to create blogger gadgets?

The blogger gadgets are nothing but simple XML files.
Each of these xml files are composed of html and
optionally javascript code.

In this post I will show a simple example where a user
can create a simple gadget, include in her blog and then
eventually modify and submit the gadget to google so that
it could be made available worldwide to all users.

The following simple code is the test.xml file which you can
upload at your favorite webserver.

<?xml version="1.0" encoding="UTF-8" ?>
<Module>
<ModulePrefs title="hello world example" />
<Content type="html">
<![CDATA[
Test, gadget!
]]>
</Content>
</Module>

Use the add a gadget on your google blog. At the bottom end
of the left hand side you will see an option that says add your own.
Use that option to enter the URL of place where you are hosting
this test.xml file. Adding the gadget from there on should be
as simple as adding any other gadget to your blog.


Inside a Blogger Gadget -

As shown in the code above, the gadget is just a simple xml
file that can include html and (optionally) javascript code.
This code is a vanilla html hello world program which can
be modified by adding other html tags such as the image
( <img> ) tag. In a simple followup to this example I will
add an <img> tag to the file to add an image that you
can use to display an image in your gadget -

<?xml version="1.0" encoding="UTF-8" ?>
<Module>
<ModulePrefs title="hello world example" />
<Content type="html">
<![CDATA[
Test, gadget!
<img alt="Photo" src="http://URL_to_my_image.gif" />
]]>
</Content>
</Module>

In the above code please change src of the picture to
the place where the image is hosted. Upload the code
to any webserver and use that URL to add and test
the gadget as mentioned above.

Please post comments if you see any issues with
the same.

Friday, April 17, 2009

Wimax - Difference between Profile A, B and C Setups

There is a functional difference between the three profiles
for the Wimax technology. The main distinguishing features
can be highlighted as -

Profile A: The ASN is centralized with the functional
units like the BS and the ASN gateway are separated into
independent entities. The radio resource management (RRM)
is separated into two functional blocks - the RRC which operates
on the ASN GW and the RRA which operates on the Base station.

RRA - Radio resource agent
RRC - Radio resource controller.


Links between the BS and ASN-GW is established through the
R6 link.

Profile B: Considers a distributed ASN side and the BS and the
ASN GW functionalities are pushed to a single architecture. All
major functionality is a part of the ASN architecture.


Profile C: Has all the things as same as the Profile A setup,
except that the RRC is also pushed to the BS. There are other
minor differences with mobility and handover control, which
is moved from the GW to the BS.

These profiles are a part of the Release 1.

Tuesday, April 14, 2009

How to find debian distribution version

If you are not sure which distribution you are running - Eg
Debian, fedora, Ubuntu. You might need to run multiple steps
here. However if you know your distribution and just need to
check which version you are running distribution specific steps
would suffice -

1. Debian -
The following command should

misfit@mufasa:~/$ cat debian_version
lenny/sid
This shows which version of debian I am running.

2. Other distributions - Redhat/Ubuntu
You could try the following command -

misfit@mufasa:~/$ cat /etc/*release*

Hopefully either of these option solve your issue.

How to remove eth0_rename linux

There are multiple approaches to eliminate this problem -

1. A GUI based approach - If you are using the Gnome
desktop which has the networking tool, the solution is
straight forward. Go to the System -> Network ->
Administration menu. Select the appropriate interface,
and rename it from using that tool.

2. A Command line approach - is as per the guidelines
listed in the post here. However to solve this specific problem
you need to follow the specific steps. Do a ifconfig on the
interface -


$> ifconfig eth0_rename

This should have some information like hw addr: aa:bb:cc:dd:ee:ff
Use this hardware address to search the entry within this
file -


vi /etc/udev/rules.d/70-persistent-net.rules

and change the name of that interface to whatever you want -
E.g. eth0. Please note that the name eth0_rename might have
come out due to wrong renaming of interfaces, and hence you might
see multiple entries with the same interface name in the file.

Save and quit the file. Reboot the machine and your woes will
be all gone.

Good day.

Monday, April 13, 2009

Umount / Umount2 device is busy

I was playing with a UML installation on debain, and after
finishing stuff needed for the installation, I needed to manually
unmount the partition. So I started with the simple umount -


$> umount /mnt/uml/
umount: /mnt/uml: device is busy

So I figured the issue could be solved by a forced unmount which led to -

node1-1:~/# umount -f /mnt/uml
umount2: Device or resource busy
umount: /mnt/uml: device is busy
umount2: Device or resource busy
umount: /mnt/uml: device is busy
Finally, after searching the only solution that seems to do the trick is
a lazy unmount -

node1-1:~/# umount -l /mnt/uml
node1-1:~/#
Lazy unmounting works the smart way by detatching the filesystem from the
hierarchy as soon as the command is issued and does the reference cleanup as
soon as it detects that the device is not busy anymore. An alternative approach
to this may involve finding out what operation is causing the device to be busy
using utilities like fuser. However doing it the "lazy" way is always easier.

Difference between Fstab and Mtab

1. Is a configuration file provided on linux based machines for specifying how the file systems are to be mounted. Shows how the filesystems are currently mounted.

2. Fstab is an input file and mtab is a status or output file.

3. Fstab generally has rules which show how all the file-systems should be mounted. Mtab shows only those file systems that are currently mounted (Eliminates those FSes which were unmounted.)

Different ways to define primary key classes in EJB 3.0

When object relational mappings require a primary key to be composed 
of multiple persistent properties (i.e. composite key ) the JPA provides 
following two ways of mapping :
1) @javax.persistence.IdClass annotation
2) @javax.persistence.EmbeddedId annotation
  in conjection with @javax.persistence.Embeddable annotation


Sunday, April 12, 2009

Vista windows explorer green bar - How to remove it??

There are multiple posts on the net recommending different
ways to speed up windows explorer.

1.
One of them included changing the views of the folders from
detailed to icons. This did not seem to make much difference to
the performance on my machine.

2.
Another solution was to go to Tools menu -> Folder
Options -> General Tab, and selecting the windows classic
folder view. My machine was already having that and thus
did not contribute to removing the slow green bar at the
top of the screen. With classic I have the slow gray bar :)


3. The solution that works for me is - to start with the
windows explorer and go to the Tools menu -> Folder
Options -> View. Then go to the Advanced Settings
and select the “Always show icons, never thumbnails.

The final solution is the one that seems to work for me
and I think it will work for you too. This solution prevents
windows from trying to generate a thumbnail for each
video and picture file you are trying to browse through.

Please post comments and let me know if this works for
you.

Best time to visit different parts of India

Agartala - October to April 
Agra - October to March  
Ajanta Ellora - All round the year  
  (Preferably October to March)  
Amarnath - July to August  
Andaman and Nicobar islands - October to May  
Ayodhya - July to September  
Badrinath - June to September  
Bangalore - All round the year  
  (Best suitable is durin balmy winter)  
Bhubaneshwar - September to March  
Bodhgaya - October to February  
Chennai - November to March  
Dadra Nagar Haveli - November to March  
Darjeeling - mid September to mid December  
  and from mid March to mid June 
Dehradun - All through the year  
Delhi - February to April and August to November 
Diu Daman - October - May  
Dwarka - October to March  
Gangotri - May-June and September to November  
  (The temple usually remains open from last week  
  of April to 2nd week of November)  
Gir - Mid October,Mid June, November and February  
Goa - October to March  
Golconda - September to March  
Gwalior - October to March  
Haridwar - October through March  
Haryana - October to March  
Hyderabad - October and March  
Kanyakumari - October to March  
Kashmir - March to October  
Kedarnath - May to October  
kerala - All season destination preferably August to March  
  (April to August is considered the best time for  
  getting Ayurvedic treatments)  
  (June & July for monsoons)  
Khajuraho - October to April  
kolkata - October to March  
Konark - October to March  
Kullu - May to October  
Lakshadweep - All round the year  
Leh Ladakh - June to September  
Lonavala - October and May  
Lucknow - October to March  
Madurai - October and March  
Mahabaleshwar - October to June  
Manali - May to October  
Mathura - October to March  
Mumbai - October to February  
Mussoorie - Aprilto June and September-October 
Mysore - October and March  
Nagarjuna Sagar - October to March  
Nainital - March to June  
Nalanda - October to March 
Panchgani - September to May  
Pondicherry - September to March  
Puri - Later part of March or early April  
Rajasthan - October to March  
Rishikesh - May-June and September to November  
Sanchi - October to March  
Simla - Any time  
Srinagar - April to June  
Tirupati - Any time in the year  
  (Ideal time is September to March)  
Vaishno Devi - March To July 

Saturday, April 11, 2009

Ebay virtual game items prohibited? - How to list an item on ebay?

Ebay bans the listing of virtual game items such as
currency, leveling etc. To get around this you have to
ensure that you remove all non-word strings such as
Rs2 from the listing. This worked for me.

If it does not - contact ebay support. Search for not
able to list an item and select a topic that best
matches your problem description. If you chose to
do a live chat, ebay wil resolve the issue for you
right away.

Friday, April 10, 2009

write2 failed: Iperf error

I encountered this error today when I was testing performance
of a link. I am not quite sure if this error is a bug due to
a specific version of iperf, but was able to get around it
by reducing the size of the transmitted packet as compared to
the MTU. By default iperf uses a 1470byte packet for transmission,
cutting down that size below 1440bytes (with MTU of 1500) helped
remove the error.

Again I am not sure if this is a version error and the solution
posted here is just a quick fix.

Thursday, April 9, 2009

Command to check port usage

A simple linux command by the name netstat does it.
Usage is -
$> netstat -a

Using the -a switch shows the ports that are both listening
and not listening at the moment. Such a tool is useful
for debugging services which are connection based such
as webservers and sockets.

How to install complete kernel source centos

The process has a few key steps -

1. Determine your kernel version by doing -
uname -a

Determine your current distro version by -
cat /etc/*release*


Download the relevant source from the centos mirror at -
http://mirrors.kernel.org/centos/ver/updates/SRPMS/

where the ver is based on the version
of the distribution. The kernel src rpm is usually by the name
of kernel-{kernel version}.src.rpm

2. Install the source by -
$> rpm -ivh kernel*.src.rpm


3. Prepare the kernel source by applying proper patches
cd /usr/src/redhat/SPECS
$> rpmbuild -bp --target $(arch) kernel-2.6.spec

If it says that rpmbuild is not found, do a yum install on
rpm-build to get the utility. The -bp switch does the patch
application.

4. Move and link it;

# cd /usr/src/redhat/BUILD/kernel-{version} /usr/src/
$> mv linux-{ver} /usr/src/
$> cd /usr/src
$> ln -s ./linux-{ver} linux
$> cd /usr/src/linux


You are done. The /usr/src/linux directory has all the current
kernel source code. Not you need to do this procedure if
you need the entire source and not just the current kernel
source code.

Tuesday, April 7, 2009

Why is savings rate high in india

This comparison is mainly done with developed economies
such as US or Europe. Typically the savings rate such
as India and China can be as high as 25% and 50%
respectively. This may be attributed to the lack
of financial security measures like social security
which are provided by the government.

Monday, April 6, 2009

What is high relief on a coin

Relief on a coin refers to the
design of a coin such that it has a high point on the surface
of a coin. Such a design is very popular among collectors and
requires special effort, since it might require multiple strikes
or high pressure to push the metal to the highest point on the
die. Mass producing such coins in old times was not possible
due to which many coin designs such as the St Gaudens eagle
coin was not made available by the US mint until now.

Sunday, April 5, 2009

How to write a shell/C code to obtain Hardware/MAC address

We present 6 alternatives to obtain the hardware
addresses programatically through a shell script.
These scripts may be run independently or may be
invoked through C code with the
system() calls.

Considering that an ifconfig
on the node generates the output that yields the following
lines -
infinity:~# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:XX:YY:ZZ:WW:QQ
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:10



Each of the following lines of code can be run independently
to obtain the hardware address. Again, they may be invoked through
the C system command to obtain the address in C.

ifconfig eth0 | grep HWaddr | tail -c 20


ifconfig eth0 | grep HW | awk '{print $5}'


ifconfig eth0 | grep HW | cut -d' ' -f 11


ifconfig eth0 | head -1 | awk '{print $5}'


ifconfig eth0 | head -1 | cut -d' ' -f 11


ifconfig eth0 | head -1 | tail -c 20

Thursday, April 2, 2009

How to check the madwifi driver version

I recommend two approaches to doing this -

1. Check the version while the driver loads through logging in
the kernel ring buffer. If you missed that and find it difficult
to track the ring buffer do the following -
a. Clear the kernel ring buffer -
$> dmesg -c


b. Remove and reload the driver -
$> modprobe -r ath_pci; modprobe ath_pci


c. Check the kernel buffer for the version
$> dmesg
....
ath_hal: 0.9.18.0 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413, RF5413)
wlan: 0.8.4.2 (0.9.3.1)
ath_pci: 0.9.4.5 (0.9.3.1)
ACPI: PCI Interrupt 0000:00:0a.0[A] -> Link [LNKC] -> GSI 11 (level, low) -> IRQ 11
ath_rate_sample: 1.2 (0.9.3.1)
....

Shows the driver versionas 0.9.4 or whatever is your version.


2. Another approach is by locating the installed kernel module
ath_pci. Go to the directory /lib/module/kernel-version/ run the following command at this path to check the
version -
$> strings ath_pci.ko | grep version

You should see something like the following on your screen -
EEPROM version invalid
version=0.9.3.1
srcversion=7E85FB5DC8AA00A7F8867D8

Monday, March 30, 2009

Can't add venet0 to bridge

You may encounter this if you are considering bridging a point
to point device. This happens when the P2P device is not a
standard ethernet device. I have encountered this problem
while trying to bridge the wired interface eth0 with the
venet0 interface to the VPSes in an OpenVZ environment.
As of the kernel version 2.6.18-openvz-18-51.3d2-486
this feature is not available.

Command line image manipulation linux

Command line image editing is possible by the use of a
linux tool named- convert.
This tool is capable of
converting between image formats as well
as resize an image, blur, crop, despeckle, dither, draw on, flip,
join, re-sample, and much more.

What is the difference between resource reference and resource injection in EJB 3.0 ?

The Resource references and Resource injection are used to describe the process, "Dependency injection". But they differ as,

Resource Reference  
1) It uses annotation to reference objects that the container has access to but are not necessarily directly associated with EJB. 
2) The resource could be a Database, a JMS destination such as queue or topic, or a timer service.
3) Example, "@Resource" annotation is used to indicate resource reference.
4) Sample Code  
  @Resource(name=”jdbc/OracleDS”, resourceType=”javax.sql.DataSource”)  
   
Resource Injection

1) It uses other annotations to inject references to objects directly related to EJB.
2) EJB specific data.
3) Examples include "@EJB" and "@PersistenceContext".
4) Sample Code
  @EJB( name=”ejb/calci”, beanInterface=Calculator.class,
  beanName=”calci”, description=”This bean is used for calculations.”)
  private Calculator calci;
 
Note:
You want to set up multiple resource references at once at the class level. Here’s a sample:
@Resources({
@Resource(name=”queue”,type=”javax.jms.Queue”)
@Resource(name=”datasource”,type=”javax.sql.DataSource.class),
})
public class Test{
...
}




Friday, March 27, 2009

Routing/NATing on windows (XP, Vista)

A little known feature on most windows machine
is that they allowing network address translation
for other connections. Say, if you have
two wired connections an eth0 and eth1. If eth0
is connected to the internet, you can enable
eth1 to have the internet connection and windows
does this by running NAT for eth1.


This is done by going to the network connections
window. Right clicking on the interface that
has the internet connection (outbound connection)
i.e. eth0 in our case and check the box for
sharing the connection with other users on the
sharing tab. This will allow the connection to do
NATing for other users while putting them on a
default network like 192.168.0.1/24. It is a
good idea either to configure DHCP on other network
clients which could be connected to this machine
through a hub or by a cross over cable (wired case).
Static IPs on the same subnet can
also be assigned.

Fore more details lookup information on ICS on windows

Rename interface eth in linux

It is possible to change the name of the device E.g. eth0 to something like eth-intel if your machine is using udev to populate the device entries in sysfs.


Edit the file -
vi /etc/udev/rules.d/70-persistent-net.rules

as root or a power user and change entries with eth0 to whatever
you desire.

udev support is available for most kernels in the 2.6 generation.
For older kernel versions there might be tools such as hwconfig or mii-tools
available which could do the job.

If you are using a Gnome/KDE desktop, the networking/management tools
on the GUI provides a mechanism to change the name of the interface
from ethX to ethY. This facility allows direct renaming of the
interfaces while changing the udev rules itself.

Wednesday, March 25, 2009

Difference between sockets and RPC calls

Both mechanisms are intended for doing similar stuff. There is a difference in the way they are invoked and the way they operate (which can be found in tons of individual tutorials).

However the key point to note is that both mechanisms are still similar. RPC's can be thought of as an abstraction running over sockets. Sockets in turn are a crude transport mechanism (like UDP or TCP) which can be used to send just about anything. RPCs can be thought of as sending formatted information over sockets.

Check out our other post for differences

Tuesday, March 24, 2009

Break column in latex references

Latex has a beautiful tag which goes as -
\vfill\eject

This tag is to be inserted in to the .bbl file
that is generated (bibliography).
The tag is to be added before the reference entry where
you desire to end the current column and start from the
top of the second column.

Ensure that you do not re-generate your bibliography
as this will wipe out the tag entry. Please post a comment
if you have questions regarding the use of this and we will
try to reply at the earliest.

Run wireshark from command line (Linux)

A nice alternative to running wireshark in a GUI environment is to run tshark. This feature provides similar functionality to the conventional wireshark tool, but can be run like tcpdump on the console. This eliminates the need to separately sniff and make sense of packets seen on the interface.

A simplest example could be to write a binary file
$> tshark -i interface -w file.bin

or to write a plain text as -
$> tshark -i interface > file.txt

Difference short and long retry limit in wlan (802.11)

The limits define the number of MAC retries for different
types of packets. The short retries are incremented
whenever a control frame or a short frame smaller than the
rts threshold) is retransmitted. Similarly long retries are
incremented when a long packet frame is retransmitted. If
either of these retries reach their respective limits (short
or long depending on the size of the data frame), the frame
is automatically discarded.

Madwifi drivers allow to set the retry limit for frames
with the command -
iwconfig ath0 retry XX


With the Atheros family of wireless cards, *nix based machines support a
nice utility by the name athstats. Athstats
allows you to measure both the short and the long retries for a node
on a per second basis.
Typical usage -
athstats duration

The duration value is in secs.

Check out our other post for differences

Saturday, March 21, 2009

Free windows XP/Vista software

If you are a student at a qualified university and your university is a part of the microsoft academic alliance you could be entitled to install windows software for free on your machine. Check out this this link for the list of schools that are a part of this initiative. More information about the microsoft academic alliance initiative is available here.

Is it Ram or Rama (pronounciation)

Considerable debate has yielded no conclusive response on the real spelling/interpretation of the Hindu diety and warrior. Descendents of northern and western india suggest that the name is Ram and should rather be pronounced as Ram. Indians from the southern region sugest and use the name as Rama and to be pronounced as Ramaa. In fact wikipedia does so too.


The issue seems to be the way in which words are transliterated in sanskrit. Rama refers to the pronounciation with an emphasis on "m" rather than as "maa". The pronounciation as aa in sanskrit has a dash on a which is missing in Rama. Hence in english though the spelling Rama could be correct (as per the sanskrit transliteration), it should still be pronounced as Ram.

Difference between stock and vanilla kernel

Most websites do not differentiate between these two terms. However, there have been some comments in the linux communities on the difference. Some say that stock is the same as a generic kernel versions released by Linus on kernel.org while the vanilla version refers to the non-patched baseline images.

Thursday, March 19, 2009

How to upload photos using Picasa

Save all your photos in one directory(either from camera or from pen drive etc..) say "Trip photos". Now follow the steps to upload photos using picasa web 3 : 

1) If you already have gmail account go to step 3 else go to step 2.

2) To create new gmail account , go to www.gmail.com, then click on "Sign Up For Gmail" at right bottom corner and follow the steps to create gmail account. 

3) If you already have picasa web install on your computer go to step 8 else click here.

4) Click on "Download Picasa 3" at right top corner. 

5) It will open a pop a window click on "Run" button (First option out of 4 options).

6) Accept the agreement and click on "Install" to install it at default location (Or you can browse the dirctory path where u want to save it using "browse" button). 

7) It will ask for few more options to select (select them all or whichever you want (like creating a short cut on desktop etc..)) and finally click on "Finish"

  NOTE: If you select the options like "Create short cut on desktop" and "Run after finish" it will directly start picasa 3 once you click finish or you need to click on the icon from desktop to start picasa. 

8) Once you have started picasa 3 it lists all the folders under "Folders" section from your system including the one which you have created ("Trip photos"). If your folder is not listed under "Folders" section go to step 9 else click on your folder from "Folders" list and go to step 13.

9) If you want to add new folder to picasa containing new photos, click on "import" button (left top corner) 

10) Again at left top corner you have the option of selecting the device, select the "Folder" option (you can directly copy from any external device but since we already have copied photos to "Trip photos" directory we will select "Folder" option).

11) Select your folder from proper path and click on "import all" option (available at center bottom). 

12) Now it will show all ur photos on left side bar and at the bottom it will show you that it is acquiring some files, that means it is loading all your photos to picasa. Once that process is completed, click on "Import all". It will open a new pop up window where you are going to specify following things: 

  a) Give the same Folder name for your photos on the web(in our case it is "Trip photos" or you can give different folder name). 

  b) Location where these photos will be saved on your local disk (select till the directory where your folder is saved already or any other location u wish) and then click "Finish". It will show all your photos from your directory on right side with your folder added in the Folder section on left side.

13) At right top corner where all your photos from your folders are listed, you have a option called "Share" and besides that there is a small downward arrow key. Click on that arrow key and select option "Unlisted" (This way only those people whom you are inviting to view your album will be able to see it, general public can not see your album. But if your recipient FWD it to some other mail ids even they can view your album so be sure about the option you want to select). 

14) Then click on "Share" it will either open a window for login with your gmail id or if u r already logged in the sme browser it will dirctly open a pop up window where you can type mail ids to whom you want to share this album (If you already have mail ids saved in your gmail account, as you type in, it will show you that mail id for auto complete, so you can select them easily).

15) Once u have entered all the mail ids separated by comma, you can change subject if you want or leave the subject as it is. Confirm the album visibility is "Unlisted" (or anything which u prefer for your album) and then click on "Send". This way you will be able to send all your photos in one step itself. 

Note : When you click on send, it will open one more pop up window where it indicates that it is uploading photos on web... for more number of photos, it may need some time .. so do not close the window unless it says "Finished XX items uploaded(email sent). Once you see this message, it is confirmed that you have send your mails correctly.  

Note Again:Once you have send the photos you can close picasa by clicking "CROSS" sign at right top corner and continue with other work. Also you can any time delete that folder from picasa folder list (which automatically deletes it from your disk) and click on "Sync" option at right top corner (Just before "Share") to remove it even from your web album list.

Enabling arp on linux

Some devices may be preconfigured with arping disabled.
This may be seen either after running:
ifconfig interface

or by seeing a missing entry in the arp table.

This can be fixed by using the following command -
ifconfig interface -arp ip netmask netmask

E.g:
ifconfig eth0 -arp 192.56.78.254 netmask 255.255.255.0

Three approaches for enabling proxy arping through a tunnel (Linux)

Say you have a device by the name mstun which shows up
on your machine. Then to enable proxy arping of all the nodes
connected via the tunnel mstun you have to enable proxy
arping.

This can be done in three ways ($> is the prompt) -
$> echo 1 > /proc/sys/net/ipv4/conf/mstun/proxy_arp

OR
$> sysctl net.ipv4.conf.mstun.proxy_arp=1

OR
Add the line -
net.ipv4.conf.mstun.proxy_arp=1

to /etc/sysctl.conf

To work with this setup ip forwarding on the machine has to be enabled -
$> echo 1 > /proc/sys/net/ipv4/ip_forward

Sunday, March 8, 2009

Tips to buy cheap air tickets?

Yahoo is running a nice article on tips for cheap air tickets. A couple of take aways from the articles were the obvious - 1. Patience, and 2. shop for odd day tickets.

One of the rather interesting things I found was that airline deals go out at particular times of the day. I am too lazy to type so here is an excerpt from the article: -
It's natural for travelers to book their flight when the workday is done or the kids are asleep. But the airlines are posting fares on their own schedule. They file fares to the computer system that shares them among Web sites and travel agents three times each weekday — 10 a.m., 12:30 p.m. and 8 p.m. Eastern time. It's 5 p.m. Eastern on Saturdays and Sundays. That means fares can change at those times, so when you do see a fare at the price you're looking for, grab it.


Interesting read for frugal fliers.

Saturday, March 7, 2009

Fork Bomb for isolation measurement with virtualization

I am determining if fork bomb is a good way to determine the isolation provided by a virtualization mechanism. I am planning to evaluate the impact of fork bombing an OS level virtualization mechanism like OpenVZ and a para-level mechanism like Xen. Some tests by random users have shown that Xen can withstand such an attack. The question here is ... can OpenVZ do the same?

More on fork bombing here.
Baseline fork bomb in shell:
:(){ :|:& };:

Friday, March 6, 2009

Difference between SNAT and Masquerade On NAT

MASQUERADE is most often used in the same settings as SNAT. Using the MASQUERADE target results in determining the IP dynamically instead of using the static IP as provided with SNAT. Though the computation in this process increases MASQUERADE provides correct operation in real world situations where public IPs are often assigned by service providers using DHCP and can change over time.

Thursday, March 5, 2009

The 301 redirect

Looking to redirect to your new web address from your old without hurting search engine ratings? 301 redirect is your friend. This can be easily established by creating a .htaccess file and placing it in the web directory (E.g. public_html)
on that machine.

The .htaccess file should have some content like:
redirect 301 /~old_login/old_page.html http://www.new-site.com/new_page.html


Just did this for my old page and works like a charm!
Good luck.

Do not forget to chmod the .htaccess file to 755 before you try this out :)

Saturday, February 21, 2009

USB Speeds - By version

Version | Speed
---------------------
1.0 | 1.5Mbps
2.0 | 480Mbps
3.0 | 5Gbps
---------------------

Static Shock Voltage

Surprising to know that the voltage in
static shocks is considerably high -
in the range of 1000 - 10,000 Volts.
Fortunately the current is significantly
low (of the order of 5mA). Static charges
are generated when two insulating
materials are rubbed against each other.

Thursday, February 19, 2009

A two step approach to 3D plots

Step 1: Establish two independent 1D plots (X-Y axes) for the given data.
Step 2: Try to relate the two plots and while maintaining the X axis for each plot, evaluate a combined Y axis based on both variables.

Use matlab meshgrid and surf commands to draw a 3D surface.

Wednesday, February 18, 2009

The 2G to 4G Jump

Most mobile operators prefer to stick to their
2G setups for now and looking to switch directly
to 4G networks (WiMAX and LTE). Read more about
this in this article.

Thursday, February 5, 2009

Wheels spinning in opposite direction

Have you ever seen a car with fancy wheels where
the spokes seem to be moving in the opposiste direction
to that of the movement of the car? Or a old western
movie where the wagon wheel spokes seem to be moving in
the opposite direction?

- This is due to alaising. Our eye is not able to sample
fast enough to capture the movement accurately. In case of
the movies the old cameras had a very low sampling frequency.
The nyquist criterion requires sampling frequency to be
at least twice the signal to avoid aliasing.

Wednesday, February 4, 2009

Steganography

Its a nice ancient art of sending messages through picture.
It relies on providing security through obscurity. Eg:
Changing the color of every 50th pixel in a picture to
represent an alphabet.

Very interesting.