Friday, May 29, 2015

merge two/more pdf files , rotate pdf file



How to join two pdf files (in Linux):
 ===============
yum install pdfjam

# pdfjoin file1.pdf file2.pdf


Where file1.pdf and file2.pdf are the pdf files to be joined.


output will be file2_joined.pdf
(So, You need not specify this output file as part of pdfjoin command)

============================

How to rotate a pdf file and then save (in Linux):

qpdfview /path/to/file1.pdf

rotate using menus. then just save the file. thats it :)

============================

Wednesday, May 20, 2015

gluster NFS in Fedora 21


gluster volume start
gluster volume status


Now status does not show NFS ports, it is shown as N/A.

Ok, lets check whether any nfs server is running ?

In machine nfs server was running.

#systemctl status nfs-server

Now stop it
#systemctl stop nfs-server

Create the volume and check whether NFS ports are visible(like 2049).


Yes it is. :)

One weird thing, you atleast needs once to START(nfs server) and then STOP(nfs server) and then go ahead with creating volumes.

Learning:
gluster has its own NFS server, you don't need to run NFS server in your machine.
You atleast needs once to start and stop the NFS server. I think something is configured / enabled here which is made use by glusterfs. This is most likely a bug.

Thursday, April 16, 2015

synchronous vs asynchronous socket


synchronous vs asynchronous socket calls.

Builds up slowly and explains nicely.
http://www.wangafu.net/~nickm/libevent-book/01_intro.html

Wednesday, April 1, 2015

vim tools


====================================
google CCTree vim plugin

Some commands :

:CCTreeLoadDB cscope.out

:CCTreeTraceForward main

:CCTreeTraceReverse

:CCTreeRecurseDepthMinus   //you can run this multiple times.. But It will reach a limit :)

:CCTreeRecurseDepthPlus   //you can run this multiple times.. But It will reach a limit :)


====================================
// for directory view
:NERDTree


// To see all functions in single file
:TlistToggle
====================================


Sunday, March 29, 2015

Default OS after Fedora installation


First check current kernels in the system:
# sudo grubby --info=ALL | grep -E "^kernel|^index"
index=0
kernel="/boot/vmlinuz-6.XYZ
index=1
kernel="/boot/vmlinuz-6.ABC
index=2
kernel="/boot/vmlinuz-6.PQR
index=3
kernel="/boot/vmlinuz-0-rescue-ABCCD"

Set the default index:
# sudo grubby --set-default-index=0 
The default is /boot/loader/entries/86b961286bda43e580ff4adfd8da7d0e-6.11.10-200.fc40.x86_64.conf with index 0 and kernel /boot/vmlinuz-6.XYZ

Cross check the set kernel:
root@fedora:/home/saran# sudo grubby --default-kernel 
/boot/vmlinuz-6.XYZ