Friday, August 4, 2017

How long the process is running ?


How long the process is running ?

ps -o etime= -p  <pid of process>



Example:
# ps -o etime= -p 15245
      00:26

Where 15245 is PID of the process we want to check.
it's running for past 26 seconds.

Wednesday, August 2, 2017

thunderbird tip - avoid double spacing


While using Thunderbird mail client, it uses "Double space" instead of single space ( not sure how I ended up like this).

The issue is selecting paragraph as default..if you select "Body text" it will be single space.

To make this default, carry out below:

  1. Go to the main Thunderbird window and select the following from the menu bar -Tools > Options > Composition > General tab,
  2. Uncheck the box that says "when using paragraph format, pressing the enter key creates a new paragraph'.

Monday, July 31, 2017

Get notification at specific time






Run below command in your terminal :

echo ' notify-send "Meeting with Munusamy in 5 minutes" ' | at 1:25PM



echo 'notify-send "Get your tea!"' | at now + 3 minutes

echo 'notify-send "Meeting in 1 hour with the big boss!"' | at 1pm tomorrow 



Commands used:
notify-send [OPTION...] <SUMMARY> [BODY] - create a notification

at and batch read commands from standard  input  or  a  specified  file
       which are to be executed at a later time, using /bin/sh.


source: https://superuser.com/questions/38654/pop-up-notification-when-time-reaches-400pm





Thursday, July 27, 2017

full screen mode in gvim editor



You need to set the following in your vimrc (mine is /etc/vimrc):



map <silent> <F11>
\    :call system("wmctrl -ir " . v:windowid . " -b toggle,fullscreen")<CR>



Also, you need to have this package installed:
sudo yum install wmctrl.x86_64 -y 


Friday, July 14, 2017

openshift - oc cluster up in specific address



When you do 'oc cluster up' , you can access openshift console using 127.0.0.1.

But if you wish to specify IP address to access your openshift console make use of --public-hostname=<IP address>

This way you can access the  cluster even from outside (but within LAN ofcourse)


# oc cluster up --public-hostname=192.168.122.152