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:

  2. Generate the .htaccess code

  3. Copy it to your .htaccess file

order allow,deny
allow from all
deny from
deny from
deny from
deny from
deny from
deny from

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