How to Import and Export databases in Linux

Using SSH, execute the following command:

# mysqldump -p -u username database_name > dbname.sql

Once executed, your database will be exported to your /home/username/public_html/ location.

Using SSH, execute the following command:

# mysql -p -u username database_name < file.sql

Now, just the opposite, upload your database raw file to your /home/username/public_html/ location.

How to copy all file names in a directory to a text file in Windows

Step 01:
Open up your command prompt by typing cmd in the run dialog box and hitting Enter.

Step 02:
Navigate to the directory which has the files and type the following command –

DIR /B /O:N > filename.txt

This will save all the filenames in the current directory to a text file. The text file will be saved in the same directory.

Step 03:
To save file names from any sub-directories in the current folder, just add /S like –

DIR /B /O:N /S > filename.txt

That’s all!

How to set width of embedded media in WordPress 3.5

Since WordPress 3.5, the option to set the width and height of embedded media has been removed.

Open wp-content/themes/your-theme/functions.php, add the following:

if ( ! isset( $content_width ) ) $content_width = 600;

Simply replace the “600” with the respective width you would like to use.

How to disable memberslist viewing in phpBB3

In this tutorial I will explain how to disable memberlist viewing from guests/members, so only admins/mods can view it.

Open memberlist.php, Find:

// The basic memberlist

Before add:

if (!$auth->acl_get('m_') || !$auth->acl_get('a_'))
{
trigger_error('NO_VIEW_USERS');
}

Open styles/prosilver/template/overall_header.html, Find:

Replace with:

If you want to only block the memberlist do the following:

Change:

if (!$auth->acl_get('m_') || !$auth->acl_get('a_'))

To:

if ($mode != 'group' && (!$auth->acl_get('m_') || !$auth->acl_get('a_')))

How to connect to more than one IRC server with mIRC

There are a couple different ways you can connect to more than one IRC server. It all depends on if you want to always reconnect to the initial server or if you’re only connecting once.

Method 1: If you want to connect to another server on the fly, meaning once you close mIRC it will not reconnect to this server.

/server -m irc.theserver.com:6667

Method 2: Using the Remote feature in mIRC will allow you to reconnect to more than one server every time you open mIRC and the process is automatic, unlike the above.

Click Tools -> Scripts Editor… Now under the Remote tab add the following in the box:

on *:start: {
  server irc.theserver.com:6667
  server -m irc.theserver.com:6667
}

Repeat the server -m line to add more servers.


Google PageRank