Thursday, August 28, 2014

Logging Elapse Time in Shell Script on Linux

Hello Everyone,

I wanna share with you about how to compute elapse time in shell script on Linux. This tutorial I made based on my personal experience. The code is shown as the following.

STARTIME=$(date +%s)
  
for (( i=1; i<=1000000;i++))
do
  echo "$i"
done

ENDTIME=$(date +%s)
echo "It takes $(($ENDTIME - $STARTIME)) second to complete this task..." > elapse_time.txt

You can change looping part to be your own code. The result of above code will be stored into elapse_time.txt.

Thank you.


Wednesday, July 23, 2014

Login SSH between machine without password

Hi Everyone,

I would like to share my basic experience about how to set SSH between machine without password. This method can be useful when you decide to use MPI (Message Passing Interface) or to do parallel processing amount machine that are connected each others.

Let we assume name and IP Address of our machine for making simple description.

Server1 : server1@111.111.111.111
Server2 : server2@222.222.222.222

Saturday, June 28, 2014

Access SVN from Windows Client

Hi Everyone,

Today, I want to make archive about how to access svn from windows client. The step is shown as below:

1. Download SVN client from official website. In this tutorial, I use TortoiseSVN which can be downloaded from http://tortoisesvn.net/downloads.html. You can choose the installer based on your operating system bit, 32 bit or 64 bit. Installed the installer file and wait until finish.

2. Go to desktop and right-click, then choose SVN checkout.














How to install SVN server on Ubuntu 14.04

Hi Everyone,

Today I will share about how to install subversion on Ubuntu Server 14.04. Even many tutorials can be found on internet, but I create this tutorial just for my archive. You can follow the following steps:

1. Install SVN server by typing this command on Ubuntu terminal: sudo apt-get install subversion libapache2-svn apache2.


2. Make svn directory under root by typing this command: sudo mkdir /svn


Python.h missing from Ubuntu

Hi everyone,

If you get problem "Python.h: No such file or directory" when you are using pip install <package>, you can follow this command to solve the problem.
Step 1. Type sudo apt-get update to update your packages.
Step 2. Type sudo apt-get install python-dev to add Python.h into your C/C++ header file. 

That's all.

Thank you.

Source: http://stackoverflow.com/questions/15631135/python-h-missing-from-ubuntu-12-04.