Month: October 2012

Open MySQL for remote connection in Fedora 17

Open MySQL for remote connection in Fedora 17

Sometimes we need to open MySQL for remote connection. To do this, we can create file “/etc/my.cnf” or modified it if exists. The key here is: 123[mysqld] skip-external-locking bind-address = 0.0.0.0 And you need to access your MySQL console and grant remote user by: 1GRANT ALL PRIVILEGES ON *.* TO root@’%’ IDENTIFIED BY ‘YOUR_PASSWORD’ WITH …

+ Read More

How to make tornado server auto restart / reload everytime files changes

How to make tornado server auto restart / reload everytime files changes

When running Tornado web server, we must doing restart for every changes that has been maded. This tedious works for sure. Are you newbie? Yes, I just download Tornado just today and I’m a new comers for this web-framework. If you follow Tornado documentation, it only showing how to running webserver in non-autoreload way. Wait, …

+ Read More

Simple create alphabet and reverse them in Python using number

Simple create alphabet and reverse them in Python using number

It’s suddenly pop-out on my head which what the one-liner solution for creating alphabet (A-Z) in Python and reversed them. Then, the first thing is using built-in python function like ord() and chr(). Then, I can use list comprehension to make it compact. Example: 1[chr(x) for x in range(ord("a"), ord("z") + 1)]

Fix subfolder directory listing forbidden HTTPD / Apache2 in Fedora 17

Fix subfolder directory listing forbidden HTTPD / Apache2 in Fedora 17

This is the most annoying problem when you setup httpd in Fedora 17. Fedora apache directory listing for subfolder became forbidden and only allowing for folder that have “index.html” or “index.“. Solution to fix this problems is very easy. Open “/etc/httpd/conf/httpd.conf” and put this into bottom line: 123<DirectoryMatch  /home/yodi/htdocs/(.)*/>         Options +Indexes …

+ Read More

Block Incapsula Web Crawler using IPTables in Linux

Block Incapsula Web Crawler using IPTables in Linux

In my previous post, I was doing experiment by blocking crawler from Incapsula with NGINX “deny” which actually it’s doesn’t give solution for me. I don’t know if my code is wrong or NGINX can’t doing subnet blocking correctly. Because I was going into NGINX documentation and follow the article but that drive me into …

+ Read More

Block Incapsula Monitoring System flooding your web server by IP and NGINX

Block Incapsula Monitoring System flooding your web server by IP and NGINX

I have subscribe Incapsula services about one years and i’m feel great and bad with their services. First thing, I like to see that their system protecting my websites very good. But, “overprotecting” is the only way i complain to them since a years ago and it’s doesn’t fixed till now. What is it? It’s …

+ Read More

Git exlude / ignore changes on particular file for temporary

Git exlude / ignore changes on particular file for temporary

This is always happen when you working with different environment like Production, Staging, Release Branch, etc. To make some particular file being ignored for temporary, we can use “git update-index”. Here is to disable tracking: 1git update-index –assume-unchanged <file> Then to enable track updates on this particular file: 1git update-index –no-assume-unchange <file>

Create a local branch from remote branch that already exist in git repository

Create a local branch from remote branch that already exist in git repository

There will be a need when we want to create a new branch in local based on remote branch (not master) in repository. For instance, we have three branch: 1231. Master 2. Development 3. New-branch This “New-branch” already exist in our remote git repository. Then, we need to make sure if we can see this …

+ Read More