[excel] Unprotect Excel Sheets without password

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

0

Unprotect excel sheets can be done with VBA Macro.

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

Insert this code :

Sub RemovePassword()
    Dim i As Integer, j As Integer, k As Integer
    Dim l As Integer, m As Integer, n As Integer
    Dim i1 As Integer, i2 As Integer, i3 As Integer
    Dim i4 As Integer, i5 As Integer, i6 As Integer
    On Error Resume Next
    For i = 65 To 66: For j = 65 To 66: For k = 65 To 66
    For l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66
    For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66
    For i5 = 65 To 66: For i6 = 65 To 66: For n = 32 To 126
    ActiveSheet.Unprotect Chr(i) & Chr(j) & Chr(k) & _
        Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & _
        Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)
    If ActiveSheet.ProtectContents = False Then
        MsgBox "You can use the password to unprotect : " & Chr(i) & Chr(j) & _
            Chr(k) & Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & _
            Chr(i3) & Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)
         Exit Sub
    End If
    Next: Next: Next: Next: Next: Next
    Next: Next: Next: Next: Next: Next
End Sub

To execute the macro press F5

The script will return output :

“You can use the password to unprotect : XFSTGAJHG”

The password provided can use to open sheets in same workbook which still protected.

[Excel] Unhide Multiple Worksheet

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

0

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

Selamat Ulang Tahun ke-2 Putri Kecilku

Posted by cikul | Posted in Keluarga, Life | Posted on 01-09-2014-05-2008

0

Alhamdulillah.. 1 September 2014, sudah genap 2 tahun Nareswari Tsuraya Mahardhika melengkapi kebahagiaan ayah dan ibumu.. Tumbuh semakin besar, semakin pintar dan tentunya menggemaskan.. :)

IMG_20140901_094148

Masih ingat 2 tahun yang lalu, engkau lahir dari rahim ibumu dengan tangisan yang sangat keras, seakan engkau ingin memberitahukan ke semua orang bahwa kau telah lahir di dunia dan merasa bangga bisa lahir dari rahim seorang ibu yang hebat, ibu yang rela mengorbankan jiwa, raga dan selalu memberikan kasih sayangnya.

20140629_130411

Dan masih teringat bagaimana senangnya kakak laki-laki-mu ketika tahu bahwa dia mendapatkan adik yang sehat dan lucu, begitu bangganya dia bakal memegang tanggung jawab untuk bisa menjaga adik perempuan tersayang-nya.

Terima Kasih Allah, engkau telah melengkapi kebahagiaan keluarga kami, berikanlah kami selalu rahmat, kesehatan dan petunjuk agar kami bisa membimbing anak-anak kami menjadi anak yang sholeh dan sholehah, dan bisa membawa keluarga kami menjadi keluarga yang sakinah, mawaddah, warahmah.

 

Record Shell Session in Linux

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

0

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
exit
Script done

Add multiple IP Address CentOS

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

0

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

0

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

0

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

0

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 »

[JQuery] Open POST result in new window

Posted by cikul | Posted in Internet, Programming, web | Posted on 16-10-2012-05-2008

0


$.post('/url/to/get/data',data,function(result) {
WinId = window.open('', 'newwin', 'width=400,height=500');
WinId.document.open();
WinId.document.write(result);
WinId.document.close();
});

[Oracle] Automatically Kill inactive Sessions

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

0

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 »