Broken or missing icons in Windows 7/8
Q. Some of my Windows icons have disappeared and look like the default application icon. How can I fix this?
Here's an example of what it looks like:
![]()
A. This happens because the icon cache gets corrupted. There are several ways to fix this:
Redirect all except one directory in Apache
Q. I would like to redirect all but one directory in Apache. How do I do that?
A. The process is very simple, using mod_rewrite:
Let's say that "directory1" is what you would like to continue using and everything else is to be redirected:
RewriteCond $1 !^directory1
RewriteRule (.*) http://www.example.com/$1 [R=301,L]
List serial number of USB device
Q. Is there a way to under Linux to find out the Serial number of a device plugged into the system?
A. Yes, there is a simple command:
lsusb -v
This will produce a long output, so it's best to pipe it into a "more" or just a text file.
Postfix and Clam AV
It's been a while since we've posted something and a lot of stuff piled up. At the day and age of MS Exchange and cloud hosting, there are still instances when you'd like to run your own email server. Postfix being the popular choice, we present here are simple steps to enable ClamAV to scan your incoming emails (Ubuntu is used as an example in this case).
First, a short description of the steps that the mail will take:
Incoming mail → 25:postfix → 10026:clamav → 10025:postfix → Delivery to user
Installation steps are as follows:
1) download and install ClamAV
apt-get install clamsmtp clamav-freshclam
MySQL backup and restore
This is more to serve as a reminder for myself on how to backup and restore databases using the command line.
1. Backing up a database:
Where username is of course your username and dbname is the database that you are trying to backup. Userpass is optional - if you don't enter it on the command line, you will be prompted for it:
mysqldump -u username -p[userpass] dbname > filename.sql
or you can get fancier, if you need to specify the host or port:
mysqldump --user=username --password=password --port=port --host=hostname dbname > backupfile.sql
2 Backing up with compression
mysqldump -u username -p[userpass] dbname | gzip > filename.sql.gz
3. Restoring a database:
mysql -u username -p[root_password] database_name < filename.sql
Creating desktop application shortcuts in Ubuntu (12.04/12.10)
Q. I can't create a shortcut on the desktop in Gnome under Ubuntu 12.04 (or 12.10) when right-clicking on the desktop. How can I do that?
A. Some things have changed and the create desktop launcher link is no longer there. One way to create a shortcut is drag and drop the link from the menu onto the desktop. If you would like to use the traditional way, you can do so by running the following command:
gnome-desktop-item-edit Desktop --create-new
Apache Do Not Log
Q. I'm trying to clean up my Apache logs. How do I not log certain events, such as local IP?
A. This can be achieved by setting a dontlog option in your configuration files:
For example, let's say you are indexing your site and don't want the local network to appear in the logs, you can add something like this:
SetEnvIf Remote_Addr "192\.168\." dontlog
More Articles...
Page 1 of 16
<< Start < Prev 1 2 3 4 5 6 Next > End >>