Author: YQ

Drop All Tables in MySQL Database in one single command

Usually to to drop the database / schema and then re-create it is a quite easy way to delete all the tables. But this is applicable only if you have the permission to deal with the database / schema

Posted in Howto

Nginx FastCGI Example (with PHP FPM) – Path_Info & PHP_SELF

There are many guide about configuring nginx with PHP FPM, but many of them are incomplete (doesn’t handle PATH_INFO correctly) or contain security issues (doesn’t check whether the script is indeed php file).

Posted in Howto

Remove CNNIC ROOT certs from your system

CNNIC (China Internet Network Information Center) plays evil! Let’s get rid of it asap! 有些浏览器(IE、Chrome、Safari)使用的是操作系统的证书体系。这种情况下,你需要把 CNNIC 证书从操作系统的证书体系中去掉。还有些浏览器(比如Firefox、Opera)是自己带了一套证书体系。你只要在其配置界面,把不要的证书去除即可。下面分不同的浏览器,不同的操作系统,分别介绍。

Posted in Howto

Set CentOS JAVA_HOME

Create /etc/profile.d/java.sh file if it’s doesn’t exist, and add / change the content to (if you are using JDK from Oracle, you may need to adapt the path if you are using other JDK): export JAVA_HOME=/usr/java/default/

Posted in Howto

To remove the promiscuous mode authentication in VMware Fusion

To remove the promiscuous mode authentication “A virtual machine is attempting to monitor all network traffic” prompt you need to create promiscuous authorized file.

Posted in Howto

Shadowsocks and OpenWRT (ss-redir) transparant proxy setting

Shadowsocks and OpenWRT together can make your local network routing rock!

Posted in Howto

你所不知道的“二维码”

二维码,即二维条码,维基百科上的定义是:二维条码是指在一维条码的基础上扩展出另一维具有可读性的条码,使用黑白矩形图案表示二进制数据,被设备扫描后可获取其中所包含的信息。一维条码的宽度记载着数据,而其长度没有记载数据。二维条码的长度、宽度均记载着数据。

Posted in Nonsense

Atlassian License Key Decoder

I made a Atlassian License Key Decoder at: http://www.swiftcore.com/atlassian/, simply paste the license key content and decode. Please be noted that this Atlassian products license key decoder does not (and can not) generate any Atlassian key at all. This decoder

Posted in Howto

Parsing bash arguments with ‘getopts’

Let’s suppose that I’m writing a test script, that needs, as argument, the type of the test, the server, the server root password and for debugging purpose we’re going to have a verbose flag too. So, putting it down: “-t”

Posted in Howto

Split File Into Smaller Multiple Files

This example will show how to TAR and GZIP a large file and split the file into smaller multiple files. First, TAR and GZIP the large file: tar -czvf newlarge.tgz largefile.dat After the that step is done you should now

Posted in Howto