How to delete all but one file in linux directory

ls *| grep -v FileName | xargs rm -rf

Using this command you can delete all files except the one listed.

List of IP Addresses by Country

Blocking IP Addresses by Country of origin is a time consuming task. If you use a cisco or checkpoint firewall or even PF firewall on your linux distribution the configuration of such a large list of IP addresses to Block is a fairly large task.

But if you’re up to the task head over to http://www.countryipblocks.net/tag/cidr/

Here you can list all IP addresses by Country and then add them to a blacklist of untrusted IP Addresses.

Or better yet allow those you trust and disallow everyone else.

Now you can block bad IP addresses based on Country but user beware, IP addresses are added often, you’ll want to keep it up-to-date at least once a month.

Show Content on WordPress Home and None Homepages

is_home – this only shows content on wordpress homepage Read more

Send RSS to Twitter via Twitter API

Question: How to send RSS feeds to Twitter API with PHP Script and then run the php script via cron every 15 minutes. Read more

How to Create a 336 ad block, adsense

In order to create a 336 ad block for fantasyknuckleheads.com Read more