Author name: Yang Yang

Hello, I'm Yang. I build online businesses that please people. Want to join in and post some useful articles on Kavoir.com? Shoot me a message.

A few Amazon affiliate tips and my earnings of Mar. 2011

I’ve been a happy Amazon affiliate for over a year now and the monthly revenues have been steadily climbing up ever since I started promoting their products galore. The most recent month, Mar. 2011 has ended up making me over $400 in commissions or advertising fees. Attached on the right is the screenshot. Considering I …

A few Amazon affiliate tips and my earnings of Mar. 2011 Read More »

vBulletin: How to add more buttons to quick reply box toolbar?

When people are replying to a thread, going advanced editing would require an extra click as well as page loading time — very inconvenient. However, at gotalk.org, users would generally want to post a lot of code because it’s a programming language forum in nature. But vBulletin doesn’t come with a CODE button in the quick …

vBulletin: How to add more buttons to quick reply box toolbar? Read More »

vBulletin: Change default height of editor and quick reply box

The quick reply box of vBulletin is by default about 100px or less in height which is bit small for large chunks of text editing such as code. To change the default height of the quick reply box without having to click the enlarge button manually every time, you’ll have to edit the template: Changing …

vBulletin: Change default height of editor and quick reply box Read More »

MySQL: Get the exact size of a database by SQL query

phpMyAdmin doesn’t show the exact size in MB when the size of your database exceeds 1GB. It just shows something like 4.2GB, truncating everything out in the 100MB precision. So is it possible to get the database size in MB in exact numbers using MySQL query? Yes, it is: SELECT CONCAT(sum(ROUND(((DATA_LENGTH + INDEX_LENGTH – DATA_FREE) …

MySQL: Get the exact size of a database by SQL query Read More »

MySQL: How to export a database / table to XML?

You can export any MySQL database or table into an XML file by the exporting capabilities of phpMyAdmin, the web interface of MySQL. The problem with this approach, however, is that with large tables, you may have to manually export the table more than once by sections into several sequential XML files. A better approach …

MySQL: How to export a database / table to XML? Read More »

Linux: How to delete / remove hidden files with ‘rm’ command?

To delete all content in any directory, including all sub-directories and files, I’ve been using this: rm -rf somedir/* If it is to delete all content of the current directory: rm -rf * However, it turns out ‘rm -rf’ doesn’t remove hidden files such as .htaccess (Files with a name starting with a dot are …

Linux: How to delete / remove hidden files with ‘rm’ command? Read More »

Linux: How to ‘find’ and search ONLY text files?

The ‘find’ command in Linux systems searches through a directory and return files that satisfy certain criteria. For instance, to find a file that contains the string ‘needle text’ in the ‘mydocs’ directory: find mydocs -type f -exec grep -l “needle text” {} \; The problem of this approach is that it would search through ALL files …

Linux: How to ‘find’ and search ONLY text files? Read More »

Checklist slides to learn the new features in PHP 5.3 with examples

One of my old Internet friends Brad made a very nice online slide that introduces to you some of the exciting new features of PHP 5.3. I’m most interested in namespace that would make coding in a large project and code reuse much easier, especially for people who find keeping naming conventions a challenge in …

Checklist slides to learn the new features in PHP 5.3 with examples Read More »

A small mistake in a regular expression caused connection to reset – (.+)+

Was doing something with a regular expression and very oddly the connection keeps being reset every time I refresh the web page. I tried to narrow down the problematic line by removing the code in functional chunks. Finally it comes down to a preg_match() instance with a small bit in the regular expression that’s accidentally …

A small mistake in a regular expression caused connection to reset – (.+)+ Read More »

MySQL log files are taking a lot of disk space – How to disable and delete them?

I have WAMP server installed on my local computer for PHP and MySQL development. After using it for a while, the MySQL installation folder has run up some seriously huge log files that are taking enormous amount of disk space. We are talking 10s of GB here. The file names are like ibdata1, mysql-bin.000017, etc.. …

MySQL log files are taking a lot of disk space – How to disable and delete them? Read More »

MySQL: Change Default Character Set or Default Collation in phpMyAdmin

It can be annoying when MySQL imports your UTF8 database (which contains exotic characters other than those in English) in the default character set of latin1_swedish_ci, jeopardizing the text content. It is also annoying when phpMyAdmin does the same and when you forgot to set the collation to utf8_general_ci for the new database which is …

MySQL: Change Default Character Set or Default Collation in phpMyAdmin Read More »

Scroll to Top