Sunday, December 11, 2005

Save Mozilla profiles and mail and migrate to another machine

Mozilla profiles are stored at C:\Documents and Settings\\Application Data\Thunderbird\Profiles by default. There will be a random-named directory inside the Profiles directory. That's our profile directory. Save it somewhere (including all mails) and move it to another machine.

In another machine, install TB and then goes to the Thunderbird directory in Application Data. Open profiles.ini and replace [Profile0] section with

[Profile0]
Name=default
IsRelative=0
Path=D:\Documents and Settings\\Application Data\Thunderbird\Profiles\8c9mmh0q.default


In this case, I place the old profiles at D:\ so that it will not ever lost again.

Now, restart Thunderbird. This time thunderbird might crash, dont' worry. Just remove all extensions and re-install it and everything should works fine.

Monday, September 26, 2005

Backing up a DVD to AVI with merged subtitle using Mencoder

  • Encode Audio
    • mencoder vob_03_005t.vob -ovc frameno -oac mp3lame -o frameno.avi
  • Encode Video 1st pass
    • mencoder vob_03_005t.vob -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=1973:vhq:vqmin=2:vpass=1:autoaspect -oac copy -o /dev/null
  • Encode Video 2nd pass
    • mencoder vob_03_005t.vob -ovc lavc -sub subtitle.srt -lavcopts vcodec=mpeg4:vbitrate=1973:vhq:vqmin=2:vpass=2:autoaspect -af volumn=10db -oac copy -o video.avi

HOWTO Mencoder Introduction Guide - Gentoo Linux Wiki

HOWTO Mencoder Introduction Guide

Wednesday, September 21, 2005

Setting-up a Certificates Authority using OpenSSL

I forget this almost everytime, so write it down here just in case.

  1. Have OpenSSl install somewhere.
  2. Go to /share/ssl or sometimes ssl directory
  3. Fix openssl.conf. Change "demoCA" to "somethingCA" that's more appropriate.
  4. Change "-days 365" in misc/CA.sh to "-days 3650"
  5. misc/CA.sh -newca. A directory called "somethingCA" will be here.
  6. Now create a cert request
    1. misc/CA.sh -newreq for cert with passphrase
    2. To create a cert request without passphrase. "openssl genrsa -out newkey.pem 1024" then "openssl req -new -key newkey.pem -out newreq.pem"
  7. Sign the generated request with "misc/CA.sh -sign". It always looking for "newreq.pem" so be carefull. The new certificates will be in newcert.pem
  8. Copy key and cert to the machine which want to use these. Put it in appropriate directory (/usr/share/ssl/certs/{slapd-key.pem,slapd.pem} for OpenLDAP)
  9. Find the hash number of ca by "misc/c_hash somethingCA/cacert.pem". The printed value is the file name. Copy somethingCA/cacert.pem to /usr/share/ssl/certs/.0.
For OpenLDAP
  1. Need to fix /etc/openldap/ldap.conf and /etc/openldap/slapd.conf to accept the new CA
  2. Fix the following configuration
    1. "TLS_CACERT /usr/share/ssl/certs/fde68c33.0" in /etc/openldap/ldap.conf
    2. "TLSCACertificateFile /usr/share/ssl/certs/fde68c33.0" in /etc/openldap/slapd.conf
Hope that I'll never forget this again.

Monday, September 19, 2005

Wednesday, September 07, 2005

Adding driverdisk to Compute Node in ROCKS

This should be usefull for us. We can install compute node which required some driver disk. Just grab it from ROCKS mailing-list.


if you can PXE boot your compute nodes, then on your frontend, try:

# cd /home/install
# mkdir driverdisk
# cp /home/install/driverdisk/dd.img

# vi /tftpboot/pxelinux/pxelinux.cfg/default

change the line:

append ks initrd=initrd.img ramdisk_size=150000 lang= devfs=nomount headless pxe kssendmac selinux=0

to:

append ks initrd=initrd.img ramdisk_size=150000 lang= devfs=nomount headless pxe kssendmac selinux=0 driverdisk=http://10.1.1.1/install/driverdisk/dd.img

Sunday, August 14, 2005

cksfv 1.3 patch for x86_64

I've made cksfv version 1.3, a SFV checksum checker for Linux, a patch to make it works under Linux x86_64 platform. Here's the patch

diff -Naru cksfv-1.3/src/crc32.c cksfv-1.3-mod/src/crc32.c
--- cksfv-1.3/src/crc32.c 2001-07-06 13:33:08.000000000 +0700
+++ cksfv-1.3-mod/src/crc32.c 2005-08-14 00:08:13.000000000 +0700
@@ -18,6 +18,7 @@

#include
#include
+#include
#include
#include

@@ -91,11 +92,11 @@
};


-int crc32(register int fd, unsigned long *main_val, unsigned long *main_len)
+int crc32(register int fd, uint32_t *main_val, uint32_t *main_len)
{
char buf[BUFFERSIZE], *p;
int len = 0, nr;
- unsigned long crc = ~0, crc32_total = ~0;
+ uint32_t crc = ~0, crc32_total = ~0;

while ((nr = read(fd, buf, sizeof(buf))) > 0)
for (len += nr, p = buf; nr--; ++p) {
diff -Naru cksfv-1.3/src/newsfv.c cksfv-1.3-mod/src/newsfv.c
--- cksfv-1.3/src/newsfv.c 2001-07-06 13:33:08.000000000 +0700
+++ cksfv-1.3-mod/src/newsfv.c 2005-08-14 00:12:17.000000000 +0700
@@ -18,20 +18,21 @@

#include
#include
+#include
#include
#include
#include

extern void pnsfv_head();
extern void pfileinfo(char**);
-extern void pcrc(char*, unsigned long);
-extern int crc32(int, unsigned long*, unsigned long*);
+extern void pcrc(char*, uint32_t);
+extern int crc32(int, uint32_t *, uint32_t *);

int newsfv(char **argv)
{
int fd, rval = 0;
char *fn;
- unsigned long len, val;
+ uint32_t len, val;

pnsfv_head();
pfileinfo(argv);
diff -Naru cksfv-1.3/src/readsfv.c cksfv-1.3-mod/src/readsfv.c
--- cksfv-1.3/src/readsfv.c 2001-07-06 13:33:08.000000000 +0700
+++ cksfv-1.3-mod/src/readsfv.c 2005-08-14 00:08:56.000000000 +0700
@@ -19,6 +19,7 @@

#include
#include
+#include
#include
#include
#include
@@ -28,7 +29,7 @@
#include
#include

-extern int crc32(int, unsigned long*, unsigned long*);
+extern int crc32(int, uint32_t *, uint32_t *);
extern void prsfv_head(char*);

int find_file(char*, char*);
@@ -39,7 +40,7 @@
FILE *fd;
char buf[512], *end, filename[512], crc[9], path[256];
int file, rval = 0;
- unsigned long len, val, sfvcrc;
+ uint32_t len, val, sfvcrc;

if (quiet == 0) {
prsfv_head(fn);

Wednesday, July 06, 2005

Tuesday, June 21, 2005

IBM eServer - IBM Virtualization Engine

IBM eServer - IBM Virtualization Engine

Application Response Measurement - ARM

Application Response Measurement - ARM

Another Unix standard

Application Response Measurement - ARM

Main Page - Fedora Directory Server

Fedora Directory Server

Very interesting... now we have another choice other than OpenLDAP

Main Page - Fedora Directory Server

Bug 160470 - Intel 845 with i810 driver can't do Ctrl+Alt+Fn

This is a solution to my FC4 bugs.

Bug 160470 - Intel 845 with i810 driver can't do Ctrl+Alt+Fn:
"Right, it does, if one makes no errors in extracting files from the rpm. I forgot a simple dot and so the file size of lib was zero. Of course X is not able to load data from a zero size lib. ;-) So here's a small step by step to prevent other from making the same mistake -become root and cd to roots home
$cd -make a backup of libvga.a
$cp /usr/X11R6/lib/modules/libvgahw.a /usr/X11R6/lib/modules/libvgahw.a.org
-get the last FC3 xorg X11 (maybe you have to choose another ftp server or another platform) $wget ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/fedora.redhat.com/linux/core/updates/3/i386/xorg-x11-6.8.2-1.FC3.13.i386.rpm -extract the libvgahw.a from the rpm (here I missed the dot in front of /usr) $rpm2cpio xorg-x11-6.8.2-1.FC3.13.i386.rpm | cpio -ivd ./usr/X11R6/lib/modules/libvgahw.a -copy it to the right place
$cp ./usr/X11R6/lib/modules/libvgahw.a /usr/X11R6/lib/modules/libvgahw.a -remove rpm and temprary lib (be carefull not to delete your /usr!)
$rm -rf ~/usr $rm xorg-x11-6.8.2-1.FC3.13.i386.rpm -restart your X server -> Done! cheers Lars"

Have to tried it tonight

Monday, June 20, 2005

Making Bootable Linux CDs

Making Bootable Linux CDs

SunOS 5.10 Admin Tips

จดไว้กันลืม
  1. List packages installed in the system - pkginfo or pkginfo -i to list only installed package
  2. List file in the installed package - pkgchk -l
  3. List all service - svcs
  4. Control service - svcadm

Monday, June 13, 2005

NewsForge | Plone CMS for enterprise intranet applications

NewsForge | Plone CMS for enterprise intranet applications: "Plone CMS for enterprise intranet applications
Wednesday June 01, 2005 (09:01 AM GMT)
By: Donna M. Snow

Printer-friendly Email story
The open source Plone content management system is one of the best collaborative tools for enterprise intranets. Plone's core features include an enterprise-level content management system, a solid workflow engine, a wiki, role-based membership, and a search engine. It bring the benefits of sharing information to your enterprise intranet.

Falk AdSolution

Plone can handle basic CMS functions, but if that's all you want it for, there are smaller, lighter options such as Drupal and Mambo. Plone is better suited for larger enterprise implementations where there is a large user base and a need for customized application development within the organization.

Plone's workflow engine allows users to move vital documents through appropriate channels without the nightmare of passing documents through email. Plone users have the ability to work together on various types of content within the Plone interface.

Plone is easy to use and can handle many users. Non-technical employees will find the Plone interface easy to use for keeping content updated without having to learn HTML. You can add content types (such as events, news, links, documents, files, or photos) easily through a browser-based interface. An administrator can add a multitude of content types to the interface through the 200+ products available at http://sourceforge.net/projects/collective/. Plone also utilizes kupu, a visual editor that resembles a mini-version of Microsoft Word. Plone's advanced publishing feature allows users to prepare material ahead of time and schedule publication for a later date. You can also specify a date on which material is to expire, at which time it will no longer be visible to Web site visitors.

Plone's creators, notably Alan Runyan and Alexander Limi, based"

Friday, June 03, 2005

Edit texture attribute in Maya 6.5

  1. Go to Windows->Rendering Editors->HyperShade
  2. Select Textures tab
  3. Select Textures node. Press Ctrl+A or Windows->Attributes Editors
  4. Change the textures path in right panel