LendKey

Monday, November 10, 2008

Create free ringtune for iPhone

I got my iPhone for over 4 months now, and one of the biggest problem (beside of my love on it) is my favorite Ringtones in my previous phones cannot be installed on it.

Finally I ran into a site today and found the working, easy and free way to upload my ringtones:
http://www.ismashphone.com/2008/08/ringtone-iphone.html

The key is actually to use a free service provided by:
http://audiko.net

Great tool and thank you very much for sharing with us!!!

Thursday, October 23, 2008

Pidgin log file to Adium log converter

Because I'm a business owner, need to keep in touch with many of my clients, partners and employees with all different kinds of IMs(MSN, Yahoo, AIM, GTalk, Jabber, etc.). I have been using Pidgin(both Windows and Linux) to work as my All-in-one IM clients for many many years, and accumulated tons of log files through Pidgin's html log plugin. And those logs are invaluable asset to me and my business.

I switched to Mac in the past year and use Adium (http://www.adiumx.com/) to handle my multiple IM accounts. But I was never able to find a way to convert my Pidgin logs to Adium.

So I finally decided to write one myself. The script is written in PHP, you need to modify some configuration parameters before it is executed:

$srcDir= Where the original Pidgin log files and folders are located
$destDir= Where to save converted Adium log files to
$masterAlias=array("Li","Li Ma","马力");//List all Alias names you ever used in all different IM accounts and in history. Very important to make conversions right


Once the script is configured, you can run it by:

php adium_convert.php


A log file will also be created when error occurs.

You also need to copy converted Adium logs to where your current Adium's log folder, which is normally:

~/Library/Application\ Support/Adium\ 2.0/Users/Default/Logs/


The complete code is:



The script was designed to resolve my issues first. Since we have to convert Pidgin log from html format, which is not very well formatted all the time, this converter might not work 100% for your case. It took me many days to make it work for all my log files. So please make sure you verify the converted log files after you run the script. Also make sure you keep the origina log files just in case.

Enjoy!

Li

Sunday, October 5, 2008

Check object that has been locked in Oracle

select oracle_username,object_id,session_id from v$locked_object;
select object_name from dba_objects where object_id = ;

is the id of object that was returned from the first query.

Or to combine them into one script:
select l.oracle_username,l.object_id, object_name, l.session_id from v$locked_object l, dba_objects where dba_objects.object_id = l.object_id;

Friday, June 20, 2008

Allow Linux box in intranet to access internet via a gateway server

I have three servers in a intranet environment. One(A) can access internet directly. Others(B andC) are connected to A.

In order to allow B and C access internet, do the following settings:
1. vi /etc/resolve.conf
Add the following text in it:
nameserver <a's IP>

2. vi /etc/sysconfig/network
Add
GATEWAY= <a's IP>

3. Run /etc/init.d/network restart

Do the three steps on both B and C. Then they should both be able to access internet.
Try it by ping yahoo.com.

Friday, June 6, 2008

Submit form to a popup window

Sometime, when submit a form, you wanna open a new popup window and show submit result there.

Here's the code that can do the work:

<form action="report.html"
where the form will be submitted to
target="report"
name of the popup window
onsubmit="window.open('about:blank','report','width=300,height=200')">
open a new window that has the target window name and expected window size first.

It was tested in Firefox 3.0 Beta, IE 7, Opera

Tuesday, May 27, 2008

Quicken 2006 on Ubuntu 8.04 X64

Make sure you have IE4Linux (http://www.tatanka.com.br/ies4linux/page/Main_Page) installed.
Then install Quicken 2006 in Ubuntu 8.04.

Everything works smoothly, including auto upgrading patches.

I need to play more, especially test if account downloading from my online accounts still works or not.

Update: June 6th,2008
Quicken cannot do online update for my accounts, such as my credit card or band transaction history. Seams like this is an known issue. Lots of people complaint about it.

Linux driver for Lexmark E120N printer

The networked laser printer from Lexmark works like charm with my Windows machines. After I migrated to Ubuntu Linux 8.04 X64, it took me a while to find the correct driver for it.

After a few days of try, I found the best driver to use for this printer is:
Lexmark Optra E321 Foomatic/lj4dith

Finally I was able to get the first stack of fine printed document sent from my Thinkpad T61P running Ubuntu 8.04 X64!