This script checks DB server and sends alert emails in case of server problem.

Written in PHP by Alexander Selifonov

Download

Today I am going to introduce a program that’s quite useful. It’s called “Connectify”, which is a windows-7 based program to turn your regular laptop into a WIFI access point. Set up is truly simple and wizard helps you build a wifi network in a few minutes. It’s not an ad-hoc network, any device that can connect to the network. (PS3/Printers/iPhone/Etc.)
Network is secured with WPA2 but cannot be turned off, maybe because we can so easily see others’ information we we wanted to. Connectify requires Windows7/2008 R2 but ‘Windows7 Starter Edition’ is not supported. This Virtual Access Point feature was to be included in Windows7, but Microsoft had to rush the release before finishing the project. So developers of Connectify picked up the parts in Win7 and finished the program.

http://www.connectify.me

I have encountered a problem when moving an old website to a newer server. Older website was using ‘HTTP_POST_VARS’ which is deprecated in PHP5 and there were thousands of files included older version variable. Here’s the solution using  regular expression to swap ‘HTTP_POST_VARS’ to ‘_POST’ in all files under current & sub directories.

find ./ -type f | xargs perl -pi -w -e 's/HTTP_POST_VARS/_POST/g;'

* Or you can change the php.ini file (register_long_arrays=off) to use the deprecated long predefined variables, though it's not recommended.

Ascii to UTF8 converter.
This program is useful when you’re working with foreign websites. Just drag and drop a folder, then you can choose which file extensions to convert. All subdirectories and files are added to work list, so you can save time if you have bunch of files.

Author http://iwoohaha.tistory.com/110
Download http://iwoohaha.tistory.com/attachment/4993e54daa7abAX.zip

PHP supports mysql_escape_string but if you use PHP with MSSQL you need to use your own method. Here’s the code snippet to escape characters. A better solution than using addslashes.

function ms_escape_string($data)
{
        if ( !isset($data) or empty($data) ) return '';
        if ( is_numeric($data) ) return $data;
 
        $non_displayables = array(
            '/%0[0-8bcef]/',            // url encoded 00-08, 11, 12, 14, 15
            '/%1[0-9a-f]/',             // url encoded 16-31
            '/[\x00-\x08]/',            // 00-08
            '/\x0b/',                   // 11
            '/\x0c/',                   // 12
            '/[\x0e-\x1f]/'             // 14-31
        );
        foreach ( $non_displayables as $regex )
            $data = preg_replace( $regex, '', $data );
        $data = str_replace("'", "''", $data );
        return $data;
}

July 11, 2010 | In: Usuals

Hello world!

Hello world, I just opened up a wordpress so I can talk about things I’m interested into, it’s totally going to be a personal site.  :) Have a nice day

Categories

Archives

Calendar

July 2010
M T W T F S S
     
 1234
567891011
12131415161718
19202122232425
262728293031