[Excel] Unhide Multiple Worksheet

Posted by cikul | Posted in Windows | Posted on 02-09-2014-05-2008


Excel allows us to hide multiple worksheet in one action, but not for unhide, we must unhide the sheets seperately, and it takes more time to do if we have many sheets that need to open.

The way to unhide all worksheets, we can use macro to do this job, this VBA macro will help you to unhide all worksheets in your excel documents.

To open VBA macro press ALT + F11, after Microsoft Visual Basic Open, press F5 to create new macro,

Sub UnhideSheets()
    Dim workSheet As Worksheet

    For Each workSheet In ActiveWorkbook.Worksheets
        workSheet.Visible = xlSheetVisible
    Next workSheet
End Sub

To execute the macro, press F5

Record Shell Session in Linux

Posted by cikul | Posted in Linux | Posted on 03-12-2013-05-2008


Sometimes we need to log all activity we do in linux terminal. That is no problem if your terminal client had the feature, but if your terminal client don’t have feature to log your session, you can use “script” command record everything you do in a terminal session.

it’s very simple to use script, you only type this command from your shell

script -a filename

Now everything you type, as well as everything that returns as output, will be saved into the filename you chose to output to.

To stop script session, type “exit”, and script daemon will stop to recording your session

[root@server ]# exit
Script done

Incoming search terms:

acer z4 kaskus | 

Add multiple IP Address CentOS

Posted by cikul | Posted in Linux | Posted on 02-12-2013-05-2008


In Linux, we can add more than 1 IP Address in single ethernet device. To adding more IP address we must add new IP in network device configuration file,

nano /etc/sysconfig/network-scripts/

Read the rest of this entry »

Install MariaDB on CentOS

Posted by cikul | Posted in Linux | Posted on 28-11-2013-05-2008


MariaDB repositories doesn’t included by default on CentOS.
If you want to install MariaDB using YUM, you need to add MariaDB repository

nano /etc/yum.repos.d/MariaDB.repo

Read the rest of this entry »

[Linux] Find/search text in file under directory

Posted by cikul | Posted in Linux | Posted on 12-03-2013-05-2008


To search text in file under directory/subdirectory, for example we want to find php file under /home directory contains text “eval” in the content, we can use command :

shell [~]# find /home/ -name "*".php -type f -print0| xargs -0 egrep "eval" | uniq -c | sort -u | cut -d":" -f1 | awk '{print "Warning - please check this files " $2}' | uniq > eval.log

Another way we can use grep function

grep -rnw '/path/to/somewhere/' -e 'pattern'
  • -r or -R is recursive,
  • -n is line number, and
  • -w stands for match the whole word.
  • -l (lower-case L) can be added to just give the file name of matching files.

Along with these, --exclude, --include, --exclude-dir flags could be used for efficient searching:

  • This will only search through those files which have .c or .h extensions:
    grep --include=\*.{c,h} -rnw '/path/to/somewhere/' -e "pattern"
  • This will exclude searching all the files ending with .o extension:
    grep --exclude=*.o -rnw '/path/to/somewhere/' -e "pattern"
  • For directories it’s possible to exclude a particular directory(ies) through --exclude-dir parameter. For example, this will exclude the dirs dir1/, dir2/ and all of them matching *.dst/:
    grep --exclude-dir={dir1,dir2,*.dst} -rnw '/path/to/somewhere/' -e "pattern"

[CentOS-RedHat] Linux /boot: Out of Disk Space While Installing Package kernel

Posted by cikul | Posted in Linux | Posted on 21-01-2013-05-2008


When updating Kernel using YUM, i got this error message :

Transaction Check Error:
  installing package kernel-2.6.32-379.14.1.lve1.1.9.9.el6.x86_64 needs 10MB on the /boot filesystem
Error Summary
Disk Requirements:
  At least 10MB more space needed on the /boot filesystem.

It means /boot partition is out of disk space. You need to verify this with the df command

Read the rest of this entry »

[Oracle] Automatically Kill inactive Sessions

Posted by cikul | Posted in Oracle, Programming, SQL, Technology | Posted on 28-09-2012-05-2008


The problem you could face with arbitrary killing of inactive sessions is that you may kill a session that was still running (it could have just completed one procedure & hadn’t yet started another).

Perhaps an easier way to accomplish what you want (although I’m guessing here at what it is you want to do!) is to set the users’ profiles to automatically kill their session after a specified period of time e.g.

Read the rest of this entry »

[Oracle] instance recovery required, cannot set ARCHIVELOG mode

Posted by cikul | Posted in Oracle, SQL, Technology | Posted on 26-09-2012-05-2008


When I try to set archivelog in another machine using this guidance. I’ve got this error message :

SQL> startup mount;
ORACLE instance started.

Total System Global Area  320309648 bytes
Fixed Size                   731536 bytes
Variable Size             285212672 bytes
Database Buffers           33554432 bytes
Redo Buffers                 811008 bytes
Database mounted.
SQL> alter database archivelog;
alter database archivelog
ERROR at line 1:
ORA-00265: instance recovery required, cannot set ARCHIVELOG mode

Read the rest of this entry »

[Solaris] Check CPU Speed & Memory Size

Posted by cikul | Posted in Linux, Technology | Posted on 26-09-2012-05-2008


SUN OS based on UNIX, but has different structure with another linux system. For example in Linux, you can easily check CPU & Memory info using /proc/cpuinfo and /proc/meminfo, or you can check hardware information using lspci or dmidecode.

And how in SunOS?

Read the rest of this entry »

[Oracle] Setting ArchiveLog mode

Posted by cikul | Posted in Oracle, SQL | Posted on 25-09-2012-05-2008


What Is Archive Log?

As a DBA, you are responsible to recover any failures to a point of failure and also to perform your backup while online. Your organization is a 24×7 shop and you are not able to shutdown the database. Therefore, the database has to be in an archive mode.

For example you have severe corruption or a database crash that required you to restore some datafiles from several hours ago. If you have all the archived logs from that pint in time up until the moment of the crash, you can roll forward all the changes contained in those archived logs against the restored datafiles.

This process will replays all the changes in the database over the past hours. After recovering the last archived log, Oracle will then look to roll forward even more by using the online redo logs. If those online redo logs contain changes necessary, Oracle will apply those changes also.

Read the rest of this entry »