Blocking Visitors from Certain Countries

Here is an easy tip on how to use IP address to prevent users from a certain country or region from visiting your site.

  1. Go to this web site: http://www.ip2location.com/free/visitor-blocker

  2. Generate the .htaccess code

  3. Copy it to your .htaccess file

Example:
order allow,deny
allow from all
deny from 1.0.1.0/24
deny from 1.0.2.0/23
deny from 1.0.8.0/21
deny from 1.0.32.0/19
deny from 1.1.0.0/24
deny from 1.1.2.0/23

3 of My Favorite Git Aliases

Here are some of my favorite Git aliases (shortcuts).

git config –global alias.s ‘status -s’
git config –global alias.c ‘commit -am’
git config –global alias.l ‘log –oneline –decorate’

Try them!

Deploy Local Working Files to Web Server via Git

In order to do a git push to a working copy that is running live, you need to configure it to allow it:

SSH into the server, cd into the directory where your Git working copy lives, and enter this:

git config receive.denyCurrentBranch ignore

Now from your local Git working copy, you can simply

git push origin master

To push the changes to the remote. Then you need to checkout the files on the remote.

Source: Stack Overflow