Mindblown: a blog about philosophy.

  • Regularly Runs MySQL FLUSH QUERY CACHE

    In some situation, like suggested in some mysql optimization script, you may want to regularly run “FLUSH QUERY CACHE”. First, open your terminal and try to run this command : mysql -e ‘FLUSH QUERY CACHE’ If there is no error, you can add that command in your cron job, such as this command to run […]

  • Setting MySQL innodb_buffer_pool_size

    I was confused how big i should set my “innodb_buffer_pool_size” value. Then i find this post in stackexchange. I can run this query to get what is the suggestion of “innodb_buffer_pool_size” value. SELECT CEILING(Total_InnoDB_Bytes*1.6/POWER(1024,3)) RIBPS FROM (SELECT SUM(data_length+index_length) Total_InnoDB_Bytes FROM information_schema.tables WHERE engine=’InnoDB’) A; The result will be in GB.

  • iOS 9 Stuck in Slide to Upgrade

    Recently i just tried to upgrade my 2 devices : First, iPhone 5s from iOS 7 to iOS 9 using Wi-Fi. Second, iPad 2 from iOS 8 to iOS 9 using Wi-Fi. Upgrade of the iPad went successful. But on iPhone upgrade, i was stuck in “Slide to Upgrade” step. I could not do anything. […]

  • How to Create and Extract Tar.gz File in Linux

    How to create tar.gz in Linux : tar -zcvf “archive.tar.gz” “file.sql” tar -zcvf “archive.tar.gz” “/home/example/public_html/” How to extract tar.gz in Linux : tar -zxvf “archive.tar.gz”

  • Javascript Get Content Stretch Size

    I had a situation like this : I have a content. The size (width and height) has been known. Now i want to stretch the content to the screen with some fill rate (for example max 90% of screen size). I made a javascript code below.

  • How to Install PECL Memcache in WHM / CentOS

    You can run these commands to install PECL memcache (not memcached). However, this memcache will work with memcached. wget http://pecl.php.net/get/memcache-3.0.8.tgz tar xvfz memcache-3.0.8.tgz cd memcache-3.0.8 phpize ./configure make make install Take note of the php extensions directory that memcache is installed in. Mine is: /usr/local/lib/php/extensions/no-debug-non-zts-20020429/ Then add this line to your php.ini extension=”/usr/local/lib/php/extensions/no-debug-non-zts-20020429/memcache.so”

  • How to Install Memcached in WHM / CentOS

    I use Centos & WHM. Here is how to install memcached (not memcache) using command line. First, installing memcached wget http://memcached.org/latest tar -zxvf memcached-1.x.x.tar.gz cd memcached-1.x.x ./configure && make && make test && sudo make install

  • How to Fix WARNING: Creating default object from empty value

    You may encounter this “warning” message when using PHP 5.4 or above E_WARNING: Creating default object from empty value Here is how to fix this ๐Ÿ™‚

  • How to Change SSH Port with WHM & CSF

    If you are using WHM & CSF, under CentOS, you may follow this steps to change SSH port from 22 (default) to something else ๐Ÿ™‚

  • How to Install ConfigServer Security & Firewall (CSF) in WHM

    To install ConfigServer Security & Firewall (CSF) in WHM, please run this commands in your SSH terminal one by one. wget https://download.configserver.com/csf.tgz tar -xzf csf.tgz cd csf sh install.sh After it completes, there is a new menu in WHM which is under “Plugins” category, named “ConfigServer Security & Firewall”. ๐Ÿ™‚

Got any book recommendations?