29 May 2013

python pgp

$ sudo apt-get install python-pip
$ sudo pip install python-gnupg



ref >>> http://www.gefira.pl/blog/2011/04/11/securing-sec-walls-secrets-with-gnupg-and-python-gnupg/



import gnupg

gpg = gnupg.GPG(gnupghome='/home/testgpguser/gpghome')
with open('my-encrypted.txt.gpg', 'rb') as f:
    status = gpg.decrypt_file(f, passphrase='my passphrase', output='my-decrypted.txt')

print 'ok: ', status.ok
print 'status: ', status.status
print 'stderr: ', status.stderr
ref >> http://www.saltycrane.com/blog/2011/10/python-gnupg-gpg-example/

27 May 2013

python senarai method

dir(nama_module)

help(nama_module)

tipu helai gpg

senarai public keys:
  gpg --list-keys

senarai private keys:
  gpg --list-secret-keys

decrypt file:
  gpg -o outputfile -d myencrypted.file.asc

ref>>  http://irtfweb.ifa.hawaii.edu/~lockhart/gpg/

------------------------

to import a public key:
gpg --import public.key

This adds the public key in the file "public.key" to your public key ring.

to import a private key:
gpg --allow-secret-key-import --import private.key

This adds the private key in the file "private.key" to your private key ring. There's a note (*) at the bottom explaining why you may want to do this.

to delete a public key (from your public key ring):
gpg --delete-key "User Name"
This removes the public key from your public key ring.
NOTE! If there is a private key on your private key ring associated with this public key, you will get an error! You must delete your private key for this key pair from your private key ring first.

to delete an private key (a key on your private key ring):
gpg --delete-secret-key "User Name"
This deletes the secret key from your secret key ring.

To list the keys in your public key ring:
gpg --list-keys


To list the keys in your secret key ring:
gpg --list-secret-keys


To generate a short list of numbers that you can use via an alternative method to verify a public key, use:
gpg --fingerprint > fingerprint
This creates the file fingerprint with your fingerprint info.

12 April 2013

raid

RAID 0
-block strip - > laju (write)


RAID 1
- mirror




RAID 5
- block strip -> laju(write)
- satu harddisk rosak, still boleh recover





RAID 10
 - kombinasi RAID 1 dan RAID 0



ref:  http://www.thegeekstuff.com/2010/08/raid-levels-tutorial/

21 February 2013

18 January 2013

Masalah maximize pada crossover / wine

Isu office tak boleh unmaximised.

Pergi pada:

  Application -> Crossover -> [Manage Bottles]

Ambil tab [Control Panel]

Ambil [Wine Configuration]

Tab Graphics

Untick pada :
   1- Allow the window manager to decorate the windows
   2 - Allow the window manager to control the windows

Mungkin kena restart office tersebut.


vSphere Client

isu permission:


setting ada 2 level,
1- Globally
2- pada Image tertentu sahaja.
Utk global, klik pada ip yg terdapat pada kolum kiri
Utk image tertentu, klik pada image tersebut.


Untuk set kan access, perlu 2 perkara(dalam tab):
1- Users & Group
2- Permission

Pertama, add user pada tab 'Users & Group'.
Kedua, add permission pada tab 'Permission'