Tuesday, June 16, 2015

encrypt / expiry date for shell script


Can you encrypt a shell script?
Can you set a expiry date so that shell script will no longer execute?

check this link:
http://www.thegeekstuff.com/2012/05/encrypt-bash-shell-script/

Tuesday, June 9, 2015

sshfs fuse - howto


mkdir /mnt/gfvm1

sudo sshfs root@192.168.122.209:/  /mnt/gfvm1



seems there is some bug in fuse.
ls -ltr /mnt on gfvm1 shows some special ?? chars

firefox image display issues


Firefox unable to display images present on the website

Unable to see small images on website:

check this option, it may be unchecked.

Contents -> Fonts and colors -> Advanced.

Allow pages to choose their own font - should be CHECKED.

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.