MySQL for Mac OS X

Get MySQL from Make alias for Terminal alias mysql=/usr/local/mysql/bin/mysql alias mysqladmin=/usr/local/mysql/bin/mysqladmin if you want to make the alias permanent, you need to create / edit a file call [.bash_profile] nano ~/.bash_profile and add the command to the file save and exit. reference Reset MySQL server root account password $ cd /usr/local/mysql/bin $ ./mysqladmin -u …

MySQL for Mac OS X Read More »

Synology + Composer

Turn on PHAR directive from DSM Control Panel shh into BusyBox cd to the project directory get composer from curl -sS | php Enable Customize PHP open_basedir from DSM control panel and append the following path to it. :/root:/usr/bin Restart apache /usr/syno/etc/rc.d/ restart

WordPress Change Domain stepts

Just find a post about moving domain and change domain name for wordpress blog @ This post use MySQL replace() function to modify the database To update WordPress options with the new blog location, use the following SQL command: UPDATE wp_options SET option_value = replace(option_value, ‘’, ‘’) WHERE option_name = ‘home’ OR option_name = …

WordPress Change Domain stepts Read More »

Block Spam comments using PHP code

The following code is from official < ?php $block = array(“”, “yy.yy.y.yyy”); if (in_array ($_SERVER[‘REMOTE_ADDR’], $block)) { header(“Location:”); exit(); } ?> I’ve added the read from file function and store the values into the array. The following code will check the IP does it existing in the array, if the IP is exist, …

Block Spam comments using PHP code Read More »

What is the unit after Terabyte (T)

1 Byte = 8 Bits 1 Kilobyte (KB) = 1024 Bytes 1 Megabyte (MB) = 1024 KB 1 Gigabyte (GB) = 1024 MB 1 Terabyte (TB) = 1024 GB 1 Petabyte (PB) = 1024 TB 1 Exabyte (EB) = 1024 PB 1 Zettabyte (ZB) = 1024 EB 1 Yottabyte (YB) = 1024 ZB