Apache .htaccess – Allow / Deny access from certain IPs

Posted in category Unix/Linux, Web

If  your website is under contruction and you want to allow access just to certain IP numbers, placing the following code in the .htaccess  file, in the website root directory, you can block access to everyone except the IP numbers you specify.

order deny,allow
deny from all
allow from 76.33.193.98
allow from 84.23.122.204
allow from 93.34.133.203

If you wish to deny access to specific IPs use the following code:

order allow,deny
deny from 192.168.0.1
deny from 192.168.0.2
allow from all

The Fabulous Logic Analyzer – Problems during port initialization

“TFLA-01 is a simple logic analyzer for the PC.  This one consists of a simple schematic which is attached on the PCs parallel port (a real parallel port is highly recommended, not a USB adapter) and which can analyse H and L levels of 8 inputs. On the PC, there’s running a graphical program which displays the contents.”

You can get the schematics and read more about it on tfla-01.berlios.de

There is a chance that you might get into problems with the parallel port initialization.  The error message might look like:  “An error occurred while colecting data: There was a problem during port initialization. This could be because another driver has opened the port exclusively, or other reason.”

There is a solution to this and it’s name is giveio.sys Read the rest of this entry »

Expand a Flash movie in height and width by 100%

Posted in category Web

To expand a flash movie (.swf) by 100%  you have to set its height and width to 100%. But that’s not enough. The parent container the movie is sitting in needs to be 100% w/h too. By default all DIVs are 100% wide but they don’t expand 100% in height. To accomplish this set the css property height to 100% for the HTML and BODY tags and the DIV tag the flash movie is residing in. Read the rest of this entry »

My Garmin Forerunner 305 doesn’t power on – It’s just DEAD! The Solutions.

Posted in category Sports

If you experienced the same as I did and your Garmin Forerunner 305 just doesn’t turn on then try one of there steps i describe below to bring it back to life. Beside not responding to any buttons the computer doesnt recognize it either when connected through the USB interface.

I’ll present you with a few solutions I found surfing the web that might work for you. Read the rest of this entry »

Wordpress – Weird characters after wordpress upgrade

Posted in category Wordpress

If you see weird characters after upgrading your wordpress version, the reason for that might be wrong character encodings.

1. Easy solution:

- open wp-config.php for edit.
- make sure you have empty values for  define(’DB_CHARSET’, ”); and define(‘DB_COLLATE’, ”);

2. Convert all tables to UTF-8

- follow these steps. not tested yet!

MYSQL – Disabling FULLTEXT Search stopwords

Posted in category Database


To disable MySQL FULLTEXT Search stopwords open the mysql config file and below [mysqld] add the following line:

ft_stopword_file = “”

By setting the ft_stopword_file value to an empty string the usual stopwords won’t be ignored any more.

Here is what the manual says about setting a new stopwords file:

To override the default stopword list, set the ft_stopword_file system variable. (See Section 5.1.4, “Server System Variables”.) The variable value should be the path name of the file containing the stopword list, or the empty string to disable stopword filtering. After changing the value of this variable or the contents of the stopword file, restart the server and rebuild your FULLTEXT indexes.

The stopword list is free-form. That is, you may use any nonalphanumeric character such as newline, space, or comma to separate stopwords. Exceptions are the underscore character (“_”) and a single apostrophe (“’”) which are treated as part of a word. The character set of the stopword list is the server’s default character set; see Section 9.1.3.1, “Server Character Set and Collation”.

MySQL – How to change the FULLTEXT SEARCH 4 character minimum behaviour

Posted in category Database

By default the FULLTEXT minimum characters behaviour is set to 4 characters. To check what value is preset on your server type the following query:

SHOW VARIABLES LIKE ‘ft%’;

That shoud bring up a result similar to this:

Variable_name Value
ft_boolean_syntax + -><()~*:”"&|
ft_max_word_len 84
ft_min_word_len 4
ft_query_expansion_limit 20
ft_stopword_file (built-in)

To change the ftp_min_word_len you have to edit the my.ini configuration file.
Below [mysqld] add this line to decrease the min. word length to 3 characters:

ft_min_word_len = 3

Restart your server and rebuild the existing indexes by using the following query:

REPAIR TABLE tableNameHere QUICK;

PHPList – user_blacklist_data Fatal Error

Posted in category Scripts

While installing PHPList 2.10.10 on my system i got the following error for the table user_blacklist_data:

“Fatal Error: Debugging not configured properly!”

Searching the Internet i found the solution for it by editing the file
/admin/structure.php

Find the query where the user_blacklist_data is created and replace this line:
“email” => array(“varchar(255) not null unique”,”Email”),
with this line:
“email” => array(“varchar(233) not null unique”,”Email”),

Drop the existing tables and restart the database initialisation process.

WGET – FTP Download a directory recursively

Posted in category Unix/Linux

We often need to download a directory from a ftp server to a local computer. You can do this using wget and its -r parameter.  The command would be:

wget -l 30 -r ftp://user:pass@host/some_directory/

-l  sets the level depth. default value is 5 layers. i put 30 to be sure wget gets the whole tree

Eclipse – Exclude / de-exclude from build

Posted in category IDE

Sometimes working with Eclipse can be frustrating. I just spent an hour of my life looking how to include back a file into build that was excluded before (exclude from build).

To spare you that drama, just go to:
Project Preferences -> C/C++ General -> Paths & Symbols ->  Source Location
Click on the folder where the excluded file is sitting in and change its filter.

As a wise man once said, soul-d: “i call these sneaky logical options “