Friday, November 15, 2013

Faced issue with LDAP while testing with Rspec in RoR application

Issue was with tmpdir.

Error:

Cannot guess tmpdir from the environment.  Please specify it.

How to solve this?

Well,

Just add a new variable to your bashrc (environment file in Ubuntu)

e.g.

  export TMPDIR=/tmp


And that's it. This would clear up.

Dont forget to source your bashrc file before running the tests.

For sourcing you do:

source ~/.bashrc

Enjoy!

Directory Tree of Ubuntu

Directory     Content
bin     Essential command binaries
boot     Static files of the boot loader
dev     Device files
etc     Host-specific system configuration
home     User home directories
lib     Essential shared libraries and kernel modules
media     Contains mount points for replaceable media
mnt     Mount point for mounting a file system temporarily
proc     Virtual directory for system information (2.4 and 2.6 kernels)
root     Home directory for the root user
sbin     Essential system binaries
sys     Virtual directory for system information (2.6 kernels)
tmp     Temporary files
usr     Secondary hierarchy
var     Variable data
srv     Data for services provided by the system
opt     Add-on application software packages

Thursday, November 14, 2013

Wednesday, November 13, 2013

What is TCP/IP

End to End connectivity, which specifies

How data is
1)formatted
2)addressed.
3)transmitted
4)routed
5)received
at the destination

It has 4 abstraction layers

1)Link Layer.
2)Internet Layer.
3)Transport Layer.
4)Application Layer.


How to use grep for checking whether files exists or not

1.
find /dir_path -type f -print | grep 'tmpdir' # that will show files what names contain tmpdir

Saturday, November 9, 2013

Git commands

1. 
# Get number of files added to the index (but uncommitted)
expr $(git status --porcelain 2>/dev/null| grep "^M" | wc -l)

# Get number of files that are uncommitted and not added
expr $(git status --porcelain 2>/dev/null| grep "^ M" | wc -l)

# Get number of total uncommited files
expr $(git status --porcelain 2>/dev/null| egrep "^(M| M)" | wc -l)
 
2. Great post
http://stackoverflow.com/questions/2452226/master-branch-and-origin-master-have-diverged-how-to-undiverge-branches
 

Monday, November 4, 2013

Installing Eclipse for Android Development

Steps

1. Install eclipse using Ubuntu Software Center.
2. Install the adt using the >>help>>install new software >> add url
https://dl-ssl.google.com/android/eclipse/
 
And click next>>next

3. Download Android SDK and set the path using preferences in Windows tab.